As you may have known by now that laravel 6.0 has been out. Though it’s expected to have a lot of changes in the major release but in 6.0 there are not that many changes.
It’s more like 5.9 in terms of changes.
But one major change introduced in laravel 6.0 is the removal of
php artisan make:auth
Command. As you may know, this was used to create the authentication scaffolding. Thought the concept is not removed but just the way to implement has been changed.
The New Way
Authentication support is now added with the help of a package now. you can read in detail about it in here
Command to implement the Auth are as follows.
composer require laravel/ui php artisan ui vue --auth
All the other stuff is the same as 5.8. Same Routes, Controller and all the stuff.
Hope this was helpful
feel free to share your thought in the comment section.
PS: the video also has some Hindi in it, but I am sure you will get the gist.
Top comments (18)
THANK YOU! I'm only just learning Laravel by following along with a YouTube video from FreeCodeCamp and couldn't figure out what I was doing wrong when I kept getting errors by using make:auth like it said to do.
I guess you were watching a 5.8 video and using 6.x.
happy to be of any help..
Thank you. I was following the same video and had the same problem. Glad I got your video.
My question is: why?
Make:auth was so intuitive...
Also: should you run "npm install && npm run dev" after?
The purpose of extracting the make: auth package is that the developer can choose to develop on the front side either using
react
,vue
,boostrapt
and thus separate the views of this package, allowing him to decide and that it is no longer the framework who does it for the!!regarding why, there must be some architectural reason. I don't know in particular.
and yes I also believe that make:auth was more appropriate but this a small part of something big.
and yes we have to run "npm install && npm run dev" after?
Hi, after installing Node.js, and using the commands. When I type "php artisan ui vue --auth" I try to put "npm install" but it doesn't work. Only work's with react (if I use "php artisan ui react --atuh" it works). With vue says npm it's not being recognized (with npm run dev happens the same).
i think you changed default preset from vue js to react js. Laravel support both of them.
have a look at the documentation for more details.
Yes, I solved the problem, thank you so much
Helpful
Thank you ...
Bravo!
thanks
What command can I use instead of "npm install && npm run dev", I'm using windows
you can run 'npm install' in windows too, all you have to do is install node js in the system.
you can download and install it from here
Thanks 😊
happy to help
Thanks