In this episode, we're diving into the first steps of getting Laravel Fortify up and running in your application. If you've never used Fortify before, don't worry—by the end of this video, you'll have it installed, configured, and ready to use as your backend authentication layer.
Here's what we do in this episode:
Install Laravel Fortify: We start by pulling Fortify in with Composer, publishing its config file, and running the migrations. You'll see how the users table changes after the migration, especially with the new columns for two-factor authentication.
Explore the Config: Next, we open up the Fortify config file and go through the options line by line. Most of the defaults are fine, but we pay special attention to features like email vs. username login and the features
array, which lets us enable or disable various authentication features (like registration, password reset, two-factor, etc.).
Understand Routes: We check out all the new routes Fortify registers in our app, so you'll see what endpoints are now available for things like login, registration, password reset, and two-factor auth. We also talk about disabling default views (since we're using Inertia.js for our frontend) and watch how the route list changes accordingly.
Inspect Published Actions: Fortify gives you some published action classes where you can customize things like user registration. We look at where these live and briefly discuss tweaking them if you want to, such as adding extra fields like a username.
By the end, you'll see that you don't need to create a ton of boilerplate yourself—Fortify handles all the backend stuff for you. Now, you just need to wire up your frontend to these endpoints, and you'll have authentication features like registration, login, two-factor, and more ready to use.
Perfect if you're ready to see how painless backend auth can be with Fortify!