In this episode, we kick things off with a refresher on some of the foundational Laravel concepts that you'll need for the rest of the course. If you're brand new to Laravel (or just want a quick brush-up), we'll walk through everything you need to get up and running.
We start by looking at how to install a fresh Laravel project. There are a few different ways to do this, like using the Laravel installer or Composer, and we discuss some handy tools like Laravel Valet or the built-in php artisan serve
command to run your project locally, no matter your operating system.
Next, we dive into setting up your database by configuring the .env
file, choosing your database driver, and actually creating your database using whatever client you're comfortable with. We give specific examples for using Postgres, but the process is similar for MySQL or others.
After that, we take a look at migrations—how Laravel uses them to create your database schema for you. We walk through the default migrations that come with a new Laravel project and explain how to run them with the artisan command. Then, we explore how to generate a new model and migration together using php artisan make:model -m
, which streamlines the process of adding new tables and their associated Eloquent models.
To wrap up, you'll see how to customize your new migration, add fields, and rerun migrations to create new tables in your database. Throughout the episode, you'll get a feel for using the command line and artisan tool—skills that will be essential for the rest of the course!
If you're already familiar with installing Laravel, configuring a database, and basic migration/model commands, feel free to skip ahead! Otherwise, this episode should give you a solid start.