Laravel 10 full course for beginner - full authentication with laravel breeze

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you know level is really really powerful framework why because if you have to do something most probably there is a package but for very essential things Larry will provide some official packages now we already know what is package level actually is build of different different packages it actually combination of different packages so what if I want to have an authentication system like having registration then user login for good password sending email for the password how we can do that all of these things if you are having level then you don't have to worry so let's go to the documentation of level 10. then if you scroll down at the bottom you see packages these are the first party packages or we call it official packages also here you can see the first package is really great called Breeze and since the name is Breeze I sure that using this package is really a breeze so what this lateral Breeze package will do it gives you full authentication in your application so introducing you the first ever package you can use and how you can install it so to get a new package you need to say composer require package name and on which environment you want to have this package so the documentation suggests that we have to use this package in a required Dev so that's why this is a hyphen hyphen Dev flag so let's just copy this and go open our terminal clean it by pressing commands Okay and paste it now right now you can see on our required div we don't have level Breeze but let's hit enter and very soon you can see we now have a new dependency added on our project called laravel Breeze and one thing more since we are using the vs code we can see this green bar which represent that there is a change at this line number 19. which is really helpful to understand what has changed okay so since we already installed it let's go to the documentation and see what next now it says that what you need to install so first you need to say after installing the composer you need to run this command called Breeze install remember we have the Artisan command and remember I have the shortcut PHP Artisan is now PA so if I hit it and see lot of command but since we have installed this package some of the command related to this package will also add it to the list if you scroll down now we have a breeze related commands and only one command available called Breeze colon install so we have to do we have to run this command which is given like here PHP Artisan Breeze install so copy that and paste it now remember I just have two changed file but if I hit Breeze install first it is asking like which stack would you like to install are you going to use front-end with blade file or react view or just creating the API for your Authentication I just go with the blade so either you type the blade or you just type 0. so let's say 0 hit enter now it says do you want the dark mode I say yes because I like the dark mode and finally it says would you prefer best test instead of PHP unit we will come back to past later but for now I will say no okay now it is doing something and that something is coming here so what happen is this package actually export every file in the respective directory for Authentication you can see what first it has the Tailwind configuration so Tailwind CSS is a CSS utility framework then you can see we have a post CSS which is obviously related to Tailwind then since we have front-end things we also have the node module because it has already ran npm install installing node dependencies that's why we have npm Den npm node module and since we have run the npm install we have package log file and if you go here we have the test for all our authentication system authentication test email verification password reset registration profile test everything is here we are not looking into the test right now later we will do that but first let's see what actually this package has done so we just need to see for that we need to go here click on this reload and you can see now we have two new button login and register from where these two buttons are coming previously we didn't have that so we know from where this file is coming this is coming from welcome dot blade which is inside the resources views and welcome and welcome dot blade by default from the initial Point has this code so if it says that if you have the route for login then show all these things which is responsible for this buttons so I can say that login I can turn it to sign in save this reload and you can see now it converted to sign in that means we are damn sure that this is the real file but this file says that I am going to show only if there is a route called login do we really have the route for login and where is all the route routes are available in the route directory if you open this directory you can see there is a web.php which we are familiar but at the bottom we have some other routes there is a route called dashboard there's a route with some route middleware or group thing and having profile related and at last it require another file called auth.php so where is the author.php it's inside the same directory so here we have auth.php now inside this you will find that there is a route called login so there's a name for each route which we can use so it says the route has login so here is the name of login what if I converted it to sign in okay and now if I go reload you can see this is gone because we don't have any route naming login but we have sign in if I reload it says so something else like this and there is somewhere else we are using yeah this is the one and that's why we are getting error and boom we are back with the login so we understand that all these code are responsible for showing and hiding the buttons and these are all login related or I can say authentication related routes we will not go into deep of each and every route and controller and everything but we just need to see the authentication working right now if I try to register new user let's say sarthak and then sarthakat with films.com password is password password I will click on register now it says that hey you don't have any database called larval so how do I connect our laravel application to a new database because there is a problem with the database connection remember I told you this EnV file is responsible for all the configuration of your project so from where larval is finding this level database called laravel from the tnv file so see here is the database called larval what if I convert this to sartha the database name is sarthak if I reload you can see it says that hey there is no database called sarthak and this proof that everything is coming from this dot Envy file now I'm going to create a new database called level 10. so yes I can do that by creating by going into the MySQL like that but since we are on laravel we don't have to go into MySQL and create the new database what we have to do let's go to the documentation of reliable Breeze next say it says that you need to run PHP Artisan migrate so let's copy this thing paste it and hit enter so since level is smart enough and it says that hey you don't have any database called laravel 10. would you like to create it wow this is mind-blowing level is creating database into the MySQL for me so I say yes if I say yes it not only just create the database it also created some of the tables into it this means if I now go reload the page and you can see it's registered and I am logged in so log out try to login once again sarthak at bitfumes.com password is password hit on login I am logged in and this is the dashboard which is coming remember we had some routes dashboard route this is coming from this view called dashboard and we know views are inside resources views dashboard dot plate here is the dashboard and you can say if I type something save this file reload and that's coming here like this okay so we know that how this happened that means when we created the when we ran the PHP Artisan migrate command it created the database it created the tables and when I do the registration it create the user into the table how all these things are happening and what is this migration and how level know that there is a table called user where is the table I have no idea I just asked level to create the database how everything happened isn't it really a magic let's understand this magic
Info
Channel: Bitfumes
Views: 50,644
Rating: undefined out of 5
Keywords: laravel, laravel tutorial, laravel full course, Laravel 10 for beginners, Learn Laravel 10 from scratch, Laravel 10 course for beginners, PHP framework tutorial, Laravel MVC tutorial, Blade templates tutorial, Laravel routing tutorial, Eloquent ORM tutorial, Laravel database tutorial, Laravel forms tutorial, Laravel validation tutorial, Laravel CRUD tutorial, Laravel REST API tutorial, RESTful API tutorial, API development tutorial, laravel routes
Id: 3Jdy9rfYqN0
Channel Id: undefined
Length: 13min 8sec (788 seconds)
Published: Tue Mar 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.