Playing
02. Setting up

Transcript

00:00
If you're new to Laravel, or you just need a refresher, let's go through the steps that we need to take to get a fresh project set up and running.
00:07
OK, so we're going to go ahead and use the Laravel Installer to create out a new project here. And of course, I'm going to call that Laravel Subscriptions. Let's go ahead and hit Enter on that.
00:17
And we're going to go ahead and use the Laravel Pres Starter Kit. This means that we get authentication out of the box. And it's just one less thing that we need to do.
00:26
You can always choose a different starter kit or transfer this over a little bit later. OK, so when we go ahead and choose a stack, we are going to just choose Blade with Alpine.
00:36
We're not going to pull in Livewire or Inertia for this. But everything that we're going to cover here is transferable over to any of them stacks if you want to later.
00:45
OK, so we can choose Yes or No for Dark Mode. It doesn't really matter. We'll go ahead and choose Pest as the testing framework. And I'm not going to initialize a Git repository.
00:54
Let's go ahead and wait for everything to get started. And then we'll go ahead and set up our database. OK, so once that's done, we're going to go ahead and choose MySQL as our database driver.
01:03
Again, it doesn't really matter which one you choose. And we want to run the default migrations to get all of the tables that we need set up. So that's gone ahead and done that now.
01:11
OK, now that's done, let's go into the Laravel Subscriptions directory. And we'll open this up in our editor. Now that's open, let's head over to our database
01:20
just to check this out as well. So you can see that we've got a Laravel Subscriptions database with all of the tables that we need in here. And we should just be able to access our app.
01:31
Now, it depends on how you are setting this up locally. Again, if you are very new, I'm using Laravel Herd here to serve this. And I'd recommend doing that for a couple of reasons
01:40
if you're very new. This makes it incredibly easy to just get a domain like we see here set up and served with your applications. As you can see, we have a .test domain
01:52
with the name of the project that we've created. And we can just dive in and start doing anything we need. The second reason is that a little bit later on, we are going to need to set up webhooks that come through
02:02
to our local machine. And Herd gives us the ability to share our local domain with any other sites, which means that when we set up our webhooks in Stripe,
02:12
we can just put our local domain, which is being served through Herd, directly into there. And everything will be delivered. We're going to cover that later, though,
02:20
so don't worry too much now. OK, so now that we are pretty much set up, let's go ahead and register an account just to make sure that we can sign in.
02:28
And then in the next episode, we'll spend some time just fiddling around with Breeze to get this working the way that we want. OK, so as you can see, I am now signed in.
02:37
I have my dashboard. And I can update any profile details in here as well. So very familiar from the introduction. OK, great.
02:45
So once you have got Laravel application up and running and being served, we're going to go ahead and tweak Breeze to make it more suitable for the kind of subscription app that we're building.

Episode summary

In this episode, we're kicking things off by setting up a fresh Laravel project. Whether you're brand new to Laravel or just need a quick refresher, we'll walk through everything step-by-step.

We start by using the Laravel Installer to spin up a new project, cleverly named "Laravel Subscriptions." To save us some time down the road, we're pulling in the Breeze starter kit for authentication (so we don't have to build login and registration from scratch). We pick Blade with Alpine as our stack, skip the extra complexity of Livewire or Inertia for now, and opt for Pest as our testing framework. Quick note: we're not initializing a Git repo just yet, but you can do that if you want!

Next up, we set up our database connection (using MySQL, but you can choose what you're comfortable with), then run the default migrations to lay down all the core tables we need. Once that's out of the way, we open up our project in our code editor and double-check the database to make sure everything looks good.

For serving our app locally, we're using Laravel Herd, which gives us a nice, easy test domain (like laravel-subscriptions.test). Herd also makes it simple to share our local domain with outside services—super handy for when we set up webhooks with Stripe later!

Finally, we register a user account to confirm that everything is working as expected and you're able to log in and manage your profile. That's pretty much it for the initial setup. In the next episode, we'll dive into customizing Breeze and making it fit our subscription app needs.

Episode discussion

No comments, yet. Be the first!