How to Make Login and Registration in Laravel for Beginners | Authentication with Laravel Breeze

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in this video we are going to learn how to create a login and a register page in letterville we are going to learn how to set up laravel authentication easily by using layer available breeds so in the last video we've learned how to set up laravel crud and we are going to continue from this project alright let's go to laravel documentation this is level official website and then go to starter kit over here you will see laravel Breeze okay we are going to use breathe and blade so you can click over there but if you scroll up you will see installation here here is how to installation their reveal breathe copy this command then go back to the project we are going to stop our server Ctrl C and then paste it over here the command hit enter okay the next command that we have to run is this one PHP Breeze install and then we copy this one and paste this over here hit enter and it's going to tell you which stack would you like to install over here I'm going to choose blade it has to react view or API but we are going to use blade hit enter and then it's going to ask you whether you want dark mode support or not just hit enter and hit enter and if you see this error the error about failed to load post CSS config or warning to load an es modules set type to module we go to package.json to solve this a warning if you don't have this warning it's okay to continue the next step but if you have this warning you just go to package.json and enter dial here and set type to module okay and then run the previous command again PSP Artisan Breeze install hit enter choose blade and then hit enter enter okay there is no error right now the next command that you have to run is PSP Artisan migrate copy it or just type it directly okay the next command you have to type is npm install this one will install the scaffold package npm install okay okay the next command you have to do is to run npm run Dev npm run Dev this command view compiles front-end asset so you have to leave it open every time you edit the project okay let's create new terminal to run PSP artisan serve and then if you go back to this server site localhost are localhost and Port 8000 UVC login and register page over here if you click login it will redirect you to login page and you can go back and go to register let's try to register a new user for example I put my name Alex Dave to mean and my email Alex at davetamine.com this is just only sample email password and then click on register see it's redirect you to the dashboard of the user page okay if you go here you can see the profiles page and in the profiles page you can set up your information for example your name you can change it if I don't like Alex diptamine I can remove it and I can save it is chained to Alex and you can even update password and you can delete an account as well so let's log out you can log out and if you want to log in you can log in and then just enter your email address Alex Dev to mean enter the password is it also include remember me log in you will see login over here and if you log out how about you forget password log in and then you focus password to make this feature work you have to set up an email server in environment files over here EnV you have to set up mail server over here to make this feature works I'm going to talk about this later okay all right the next thing that I want you to learn is to take a look at the code for example over here if you go to resources and go to view you will see that all folder has been created these include all view or GUI for a login system if you want to edit the page over here you can over here this page you can edit it inside here for example register page over here all right you see register page let's go to register page register over here for example if you want to change this logo or remove it you can go to this page and you can go to our guest layout let's go to layout over here let me check okay let's go to guest layout you will see uh their image over here here okay for example I'm going to comment it and if I go back here you will see that the logo has been removed here you just play with this layout and the view to edit or to change the page for example in register page I want to change the background of the form over here let's see class BG red 100 I save it see it's changed the color of the form okay I'm going to remove this so this is the view okay when you take a look at the laravel architecture you will see everything has been separated okay this we this is view we have talked about view of the login page let's take a look at the controller for example if you go app here HTTP controller and you will see auth controller has been included in our application okay this is the controller that has been automatically generated by using laravel Breeze command okay if you go here is this the feature for login you can take a look at the code and this one is the controller for new password and this one is for verify email controller and we even have profiles controller which is the controller of this page let me log in okay let me log in you will see the profiles page over here right here so this page is belonged to profiles controller which is this controller okay and let me close this page okay in the last lesson we've learned about craft operation product over here why it doesn't work I think when we set up the authentication system is remove our product routes so we have to include it again let's go to GitHub and go to adaptamine GitHub okay go to The Domain GitHub and go to level crowd for beginner and over here resources sorry route and web.php I have included this one from the previous projects but it's removed it for my projects because I generate a new route by using layer will breeze so I'm going to include this row over here okay let's save it so right now I should have this route it said as product controller just an access I forget to include this one on the top of the files over here let's include it here normally we should Implement authentication before we set up crud operation you can see that our products crud operation work right now for example let me create a new product over here how about I want only a user who log into the system to create this product so I have to protect this route from unauthorized user for example if a user doesn't log in they should not be able to access to these product pages it's so simple to protect the route from a unauthorized user or a user who not log into the page you just use this middleware okay we just go to here and you just copy this route and put it over here okay let's save it for example if I hit enter over here I still able to access this page but if I go back to the home and go to dashboard and if I log out and I want to access the product page you see I cannot access to the product page and it will automatically redirect me to login page okay let's enter my email address okay and then login you will see I'm able to access to a product page for example if I put dashboard over here how about I put a link of a product page over here see the product page is this link right It's product.index let's go to dash dot blade.php you will see here you log in let's create a link over here attack ish left and then let's call route and then product dot index okay and this one product page let me add class to this one class text blue 500 and let me put BR over here and let's put hover in the mouse Point text Dot blue is can be dark blue okay save it and here product page when I click here it's redirect to product page and I can edit the product so only a user who log into the system can access to product page right now all right this is all about this video If you like this video don't forget to comment like And subscribe
Info
Channel: Devtamin
Views: 67,418
Rating: undefined out of 5
Keywords: programming, code, coding, coding tutorial, programming tutorial, web development, Laravel, Laravel 10, Laravel Login, Laravel register, Laravel login and register system, Laravel Authentication, Laravel Breeze, Laravel Breeze Blade, Authentication Laravel, Laravel Create Login and Register, Registration Laravel, Laravel Registration, Login system in Laravel, Sign Up in Laravel, Login Laravel, register Laravel, Laravel Login for beginner, Laravel register for beginner
Id: f1hCx-NXbek
Channel Id: undefined
Length: 12min 36sec (756 seconds)
Published: Sat May 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.