Course Motivation Update0:00
Initializing Laravel forum application environment. Configuring real-world simulation overhead. I wish to reach the widest possible audience. A lot by building a forum using Laravel and its surroundings. These are the voyagers of the Starship Enterprise. The eternian defender of the... Hey everybody, thanks for joining me. You know, it's been a little while since we built a forum here on Laracasts. In fact, the last time that happened was this series here by Jeffrey. And a lot has changed since this series was released.
In fact, the last time that happened was this series here by Jeffrey. And a lot has changed since this series was released. Think about it. In this series, Jeffrey uses Laravel 5.4. We're now on Laravel 10. In this series, Jeffrey uses Bootstrap. Well, many of us would now reach for Tailwind. He uses PHPUnit. I personally would reach for PEST. So when you think about it, the tooling has almost completely altered.
I personally would reach for PEST. So when you think about it, the tooling has almost completely altered. How we would actually go about building a Laravel application is drastically different to how it would have been five or six years ago. As a result, I think we can learn a lot by building a forum using Laravel and its surrounding ecosystem from scratch. And you can take away many of the points that we'll be discussing into all of your Laravel applications, no matter what version of Laravel you're currently running on. So join me as we build a forum,
Choosing the Stack1:29
no matter what version of Laravel you're currently running on. So join me as we build a forum, and we get to start with the most exciting part, choosing a stack. Let's jump in. My favorite way to get up and running with any new Laravel project is the laravel new command. The first thing we need to decide on is if we want to use a starter kit. And I'm going to go all the way to Laravel Jetstream here because it provides most of the features we need
And I'm going to go all the way to Laravel Jetstream here because it provides most of the features we need to get up and running with our forum right out of the gate. I'll dedicate the next episode to going through the Jetstream features and configuring it. For now, we need to select whether we want to use Livewire or View with Inertia. And let me say there is no wrong choice. Both are very full-featured. Both are very powerful. And they allow you to very quickly get up and running.
Both are very powerful. And they allow you to very quickly get up and running with a new Laravel project with a dynamic front end. Now, simply because it's what I'm using more at the moment, I'm going to select View with Inertia. But if you select Livewire here, you'll still be able to follow along with 90% of the content in this course. So don't worry too much about that. Okay. We can now optionally choose to have team support,
Okay. We can now optionally choose to have team support, dark mode support, or server-side rendering. I'm not interested in any of those for now. We can always come back to it later. And I need to choose my testing framework. Again, remember, PEST uses the same syntax inside the test as PHPUnit. So it's not too much of a worry. But because it's what I'm most comfortable with, again, I'm going to choose PEST here.
Touring Project Setup2:57
But because it's what I'm most comfortable with, again, I'm going to choose PEST here. And yes, let's initialize a Git repository. With our stack selected, once Laravel has finished installing all of our dependencies, well, we should be able to open our project in the IDE. And yeah, you can see here we have the standard Laravel structure. And if we dive into app, we have our Jetstream actions here, which we'll go into in a little moment.
we have our Jetstream actions here, which we'll go into in a little moment. In our config file, we should have Jetstream, which we do, and Fortify. Okay, brill. Now, we need a name for our forum. And we're going to go with Framerate, which our designer here at Laracasts, Adrian, came up with. I can't beat that. What a great name for a cinema review site.
Linking App Locally3:36
I can't beat that. What a great name for a cinema review site. I'm on macOS, and I'm using Laravel Herd. So I can say Herd link Framerate. And hopefully now, if we come to the browser, yeah, we're getting this connection refused because Jetstream is attempting to use our database. But we have things installed. Tell you what, last thing in this episode, why don't we get the database working?
Setting Up Database3:55
Tell you what, last thing in this episode, why don't we get the database working? Now, I'm using dbEngine to manage my local database instances. It's a free tool for Mac. And if you are using Mac, it's well worth your time. It basically gives you a GUI for spinning up new databases, whether that's MySQL or Postgres or Redis. And it just makes the process a whole lot easier than managing it through the terminal. Okay, so let's go ahead and spin up a new MySQL instance.
than managing it through the terminal. Okay, so let's go ahead and spin up a new MySQL instance. This is very useful because the default in Laravel is a username of root with no password. So we don't even have to change our .env file. Let's hit Create, start the service. And in just a couple of moments, there we go. We should now be able to jump back into our terminal, run php artisan migrate. And it will ask us if we want to actually create.
run php to some migrate. And it will ask us if we want to actually create the forum database. Let's say yes. Goes ahead and installs. And hopefully now if we jump back into our application, everything is working. We get past that MySQL error and we're left with a nice landing page. So installation and stack is complete.
Previewing Jetstream Next4:54
and we're left with a nice landing page. So installation and stack is complete. We're ready to dive into creating our forum. But before we go any further, we should probably configure what comes out of the box with Jetstream. And I'd like to just show you around Jetstream in case you're not familiar with it so that you can see what features are on offer. We'll do that in the next episode.
so that you can see what features are on offer. We'll do that in the next episode. See you there.
