Playing
02. Setting up

Transcript

00:00
So let's go ahead and set up a fresh inertia project. If you've already done this and know how to do this, feel free to skip to the next episode. OK, so we're going to start with the Laravel installer.
00:09
Let's use Laravel new and we'll just give our project a name. I'm just going to call this inertia chat. Once we've done this, we want to choose the Laravel breeze starter kit, which gives us authentication.
00:19
And once we've hit that, we can choose any of these options here. We're, of course, going to use view with inertia. So let's hit that. OK, so we don't want any of these optional features.
00:29
Let's go with pest for our testing framework and we won't initialize a repository. OK, once that's done, let's go ahead and choose our database. I'm going to choose my SQL and we want to go ahead and run the default migrations here. So all of the users tables and everything like that gets created.
00:46
Once that's done, you should end up with a database with all of your tables in. Once we have done that, we can go and open this up in our editor, get npm run dev running and make sure everything is working. So let's go ahead and open this up in our editor.
01:00
Just wait for this to finish. And the first thing that we'll do is run npm run dev on the command line wherever you're using that. OK, so once that has done, we're going to head over to the browser.
01:12
Once again, depending on how you're hosting this, it might be different, but I'm using Laravel herd. So let's give that a refresh. And as you can see, our app is up and running.
01:22
Let's go over to register an account just to make sure that this is working nicely. So let's go ahead and enter all of the credentials we want to register with. Hit register and we should be in. So as long as you're at this point, you have a project set up with Inertia ready to go.

Episode summary

In this episode, we kick things off by setting up a brand new Laravel project using the Laravel installer. If you've already got this down, feel free to skip ahead!

We start by running laravel new and name our project (we're going with "inertia-chat" for this demo). Next, we pick the Laravel Breeze starter kit to get authentication baked in from the start. When prompted for an option, we choose Vue with Inertia, since that's what our project is based on, and skip the extra features for now.

For testing, we opt for Pest and don't bother initializing a git repo at this step. Then we select MySQL as our database and run the default migrations, so we have all the core tables ready to go.

Once that's out of the way, we open the project in our code editor, run npm run dev to get the front end compiling, and check that everything is working smoothly by visiting our app in the browser. We wrap up by registering a test account to confirm authentication is working.

By the end of this episode, you'll have a fresh Laravel project with Inertia and Vue ready to roll!

Episode discussion

No comments, yet. Be the first!