Laravel 5.8 Tutorial From Scratch - e21 - Artisan Authentication - Register, Login & Password Reset
ฝัง
- เผยแพร่เมื่อ 19 ก.ย. 2024
- It's time for us to talk about registering users, login in users and resetting passwords. Up until now, a very daunting task, but with Laravel, it's as simple as running php artisan make auth and everything just works. Let's working on adding authentication to our Laravel application.
For the best experience, follow along in our interactive school at www.coderstape...
Resources
Course Source Code
github.com/cod...
Hit us up on Twitter with any questions or comments @codertape ( / coderstape )
About This Course
Ready to get started on your path to Laravel Artisan? In this series, we are breaking down all of the basics of Laravel to get you comfortable using the world's most popular PHP framework. Let's get started!
if you use laravel 6 make:auth not defined
you should run this command => composer require laravel/ui
then
run command => php artisan ui:auth
please pin this comment to help anyone listening to this video
using 6
@@mr_amlab366
What do you mean?
Thanks for the heads up! Following your instructions, it all seems to work except for two items:
1: It does not bring the two lines of code for Bootstrap CDN and Script which I copied manually.
2: Once logged in I cannot logout as the right hand side drop down does not work, however I will work on this and let you know when I have a solution.
Regards Mac
@@macmccarthy6609 because the command he use is the same command in this video, which is supposed to older laravel version for laravel 6 is
$ composer require laravel/ui --dev
$ php artisan ui vue
$ php artisan ui vue --auth
take a look laravel.com/docs/6.x/frontend#introduction
up
Yesss this is the magic of the ✨make:auth ✨
Cheers
i wish he didn't use that, because I want to know more about how laravel handle authentication FROM SCRATCH, as the title says
Great series so far! I ran into a small problem with make:auth being missing. I was unknowingly using Laravel 6. I changed "laravel/framework": "^6.0" in composer.json to "laravel/framework": "^5.8.0" and ran `composer update` which downgraded laravel to 5.8 and seems to be working now.
Thank you very much for this high-quality tutorial @coder's tape .. it helps me a lot. Guys, please support them by donating or at least please view the ads from start till end.
Thank you for the support.
@@CodersTape no problem.. Please keep teaching dont't stop...
why are u appearing now??? where were you???. I had hell of time going through all documentation . Thank you Thank you. Thank you . Thank you!!!!!! my life savior.
I’ve been traveling for work.
That's Awesome!
For someone who is using laravel ^6
$ composer require laravel/ui --dev
$ php artisan ui vue
$ php artisan ui vue --auth
$ npm install
$ npm run dev
best tutorial
Excellent tutorial on Laravel. Can you please tell me the name of the theme you are using? Thank you.
Material Theme Dark
Hi.I tried to provide a multi table auth but it still depends on default guard in the auth.php . Where am I wrong? In the logincontroller i have two func for each table and use auth::attempt for checking.
@Coder's Tape please help, when i put wrong credentials it will not log me in it will stay on the login page but with no error.... also when i put correct credentials it does not log me in unless i click remember me. Help please
the design is not working
I'm using laravel 8.
and php artisan make:auth doesnt work anymore.
other comments has the answer to this, but even by doing so.. the css and js is not found when you search in console.
I did manage to make the bootstrap work though.
By moving the CDN from layout.blade.php to layouts/app.blade.php
anyone know why the css/app.css and js/app.js is not working?
Thx bro
At 3:35, whenever I try to click 'New User', the dropdown won't engage. Absolutely nothing happens. I can't log out. Please help.
PS. When I opened 'app.css' under the 'public' directory, it was completely empty. I had to go to your source code and copy all of that into my 'app.css' file. And, a LOT of code was missing from 'app.js'; almost 30,000 lines of it. Just thought you should know.
Check out the lesson on the setting up the front end.
Is it possible to connect make: auth to an existing database with its user table?
Certainly. You can choose which table name to use. laravel.com/docs/5.8/authentication#adding-custom-user-providers
my layout stopped working, I changed them all to the layouts.app but I still have 0 layout on the pages? not sure where the error could be? I did do a downgrade from laravel 6.0 to 5.8, not sure if that could or would affect the layouts
I would start with double-checking the spelling of @extends() and @section() etc... Check out the Github source code for a reference. I doubt that downgrading would have caused any issues as there are no upgrades to that part of the framework, that I know of.
@@CodersTape I even copied and pasted your code from the github and the layout still isn't there
@@nanchitacr try running composer dump-autoload in the terminal
@@CodersTape I tried it and still nothing, I also tried view:clear and view:cache
@@nanchitacr Please upload your project to Github and let me take a look.
please i m getting Command "make:auth" is not defined.
Couple of things to check. First, make sure you’re in the correct project directory and type in
php artisan just to make sure that it’s working. Then try the full command.
@@CodersTape thanks i tried these before but still had the error.
i solved it by changing my lavarel/framework: '5.9.*' TO lavarel/framework: '5.8.*' in my composer.lock and i updated my composer.
I have a problem on wrong authentication login where user when login to wrong access does not showing error message but redirect to another url. Can help me for this issue ?
I’m assuming that you mean when a user doesn’t enter the correct email and password they redirected to the wrong place? There’s a couple of auth controllers and they have a variable $redirectTo. Change that to wherever they should be redirected to.
@@CodersTape Sorry your answer is not right! I mean, when I try to log in with a wrong username or password, does not show my error notice but auto redirect to another URL.
Do you see Auth::routes() in your routes/web.php file?
@@CodersTape please i m getting Command "make:auth" is not defined.
@@overlordmarvel12 go to composer.json change "laravel/framework": "5.9.*", to "5.8.*"
Then run composer update
Eu tenho erro in user.php in register: funções public_function () {return $ this-> belongsToMany (relacionado: 'App \ Role'); }} eu tenho C: \ xampp \ laravel \ ...
i need a more in-depth explanation regarding this authentication process. your tutorial just covers how to use a pre-defined feature, basically, you just tell us the "quick way" to get started. you cannot call this from scratch, I'm a bit disappointed
the voice is from freecodecamp
That’s right!
The BEST as always!
100% fix this way in laravel 6 or 7-
run commands in this way-
1. composer require laravel/ui
2. php artisan ui:auth
3. php artisan ui vue
4. php artisan ui vue --auth
5. npm install
6. npm run dev
you may face error while running- *npm run dev* . I was facing. In this case-
1. npm uninstall --save-dev sass-loader
2. npm install --save-dev sass-loader@7.1.0
then run again- *npm run dev* .
after generating login and register pages if you click login and register button and face error for a variable name *HOME* then add this in *App\Providers\RouteServiceProvider.php* file-
*public const HOME = '/home';*
Make a user permission video
Hello sir I am working in Marriage.com project through 5.8 version may you guide please