Adding authentication with Breeze
Transcript was automatically generated and may be inaccurate.
-
–
As mentioned in the previous video, I'm working on a brand new machine here, so -
–
I don't have things like PHP or Compose are installed on my Mac. -
–
We're instead going to be working with these via the cell environment setup. -
–
To make this easier, we're going to need to install an alias. -
–
The cell docs have an example of this. If we go to "configuring shell alias", -
–
we'll see this line here. It needs to be pasted into our ZShell RC file. -
–
So if we copy this, -
–
and we can open our ZShell RC file. You can either open it on the command line -
–
or in a text header like Visual Studio Code. -
–
If you already have contents in the file, just paste it after at the end. Save -
–
the file. -
–
If we open a new tab, type which cell. -
–
We can see our alias has been registered. -
–
Now that we have our project created and running using cell, we can move to add -
–
an authentication to our application. -
–
For this, we'll use a Laravel Starter Kit called "breeds", as we only need -
–
basic authentication functionality such as Logging in and Registering. -
–
And it'll also give us some tailwind styles as a starter point for our -
–
application. -
–
We can add over to the "breeds" section of the Laravel docs. -
–
Scroll down to "installation". -
–
And we're going to use the "breeds" with the "blade" stack. -
–
So we can copy this command. -
–
Change "directory" into where we've stored our website. -
–
Paste the command. -
–
We also need a pre-pended with "cell". As I say, I don't have composers -
–
installed on this machine. -
–
If we head back to the Laravel talks, as mentioned, we're going to use a "bre -
–
eds" with the "blade" stack. -
–
So we need to copy these commands. -
–
Paste the command. -
–
And we need to replace "php" with "cell". -
–
We also know we use them with the "blade" stack, so we're going to use "blade" -
–
as an argument. -
–
Let's grab this command. -
–
Remember to replace "php" with "cell". -
–
Let's run these two commands. -
–
Instead of "replace" on "mpm", we're going to take a pre-pended "cell". -
–
I'm also going to run "build" rather than "dev". -
–
We should now have "breeds installed". We can test this by seeing what "reeds" -
–
has been registered in our application. -
–
So now we can see "reeds" for things like "logging in", "logging out", "re -
–
setting passwords" and "registering". -
–
If you go on the browser, we should be able to hit those "reeds" and see our -
–
application styled. -
–
And that's it. -
–
We now have "breeds installed" and add an authentication and registration to -
–
our application. -
–
So it's probably a good point at this stage to register a user for yourself. -
–
{silence}