In this episode, we're getting everything ready to follow along with the course's example project. If you want to code along, you'll first need to download the project files from the downloads section. Once you've got the files and popped them onto your web server, you'll probably notice things aren't working just yet—no worries, that's normal.
The first step is to get our backend dependencies set up. We do that by running composer install
in the project directory. Next, we handle the frontend dependencies with npm install
. After that's done, start up the frontend watcher with npm run dev
so any changes you make later will be instantly reflected.
With the dependencies sorted, it's time to set up the database. You'll need to create a database (the guide uses laravel_performance
as an example) and update your .env
file with the right database settings—doesn't matter if you're using Postgres or MySQL. Then, migrate the database tables using php artisan migrate
.
To get some actual data to work with, we seed the database using an existing blog seeder. This creates a bunch of users and posts using Laravel's factories, so your project will have hundreds of fake articles to play with. You'll use php artisan db:seed --class=BlogSeeder
to make this happen.
Once all that's done, you should see a list of articles when you reload the app in your browser. We're all set up now, and in the next episode, we'll dive into analyzing this page using Laravel Debug Bar!