This season, we'll take a look at a first-party package: Laravel Breeze. For this style of series, we're not as focused on how to use the underlying tool (even though we'll figure that part out in the process). Instead, we're more interested in reviewing how it was constructed and wired up behind the scenes.
In the last episode, we installed Laravel Breeze and prepared to run the initial
breeze:install command. But before we do that, let's take a look at how that particular command was prepared.
At this point in our learning, we've realized that the Laravel Breeze package is primarily an Artisan command. That's it. It's a command that copies over some existing stubs to your new Laravel project, and then updates your
package.json file. This means the core of what Breeze provides is in those stubs. With that in mind, let's begin by reviewing basic registration.
If you're not yet familiar with Blade components, that
register.blade.php may initially seem odd. What are all these HTML-looking
As we finish up our review of registration, this will give us an opportunity to step outside of Breeze and look at how Laravel handles email verification. As part of this lesson, we'll also install MailHog, which will allow us to easily intercept and review emails that our application sends.
After you install Breeze into your application, you are entirely responsible for the code. You can adjust the code how you see fit to suit your current project.
Let's review the basic flow for requiring password confirmation before loading a particular route. Pay special attention, because in the following episode, we'll rewrite the functionality from scratch.
It's important that we don't fall into the trap of reading a lot of code, but rarely writing any of our own. With that in mind, let's take what we learned about password confirmations in the previous episode, and rewrite the functionality from scratch. Think of it like a kata. Once finished, we can throw away the code entirely. The goal is to focus on general workflow and habit building.