DEV Community

Cover image for php artisan make:auth in laravel 6.0
Mohammed Samgan Khan
Mohammed Samgan Khan

Posted on • Originally published at codebysamgan.com

php artisan make:auth in laravel 6.0

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)

Collapse
 
gaballison profile image
Allison Fredrickson

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.

Collapse
 
msamgan profile image
Mohammed Samgan Khan

I guess you were watching a 5.8 video and using 6.x.
happy to be of any help..

Collapse
 
mnabeelp profile image
Mohammed Nabeel

Thank you. I was following the same video and had the same problem. Glad I got your video.

Collapse
 
rezaodb profile image
Reza • Edited

My question is: why?
Make:auth was so intuitive...
Also: should you run "npm install && npm run dev" after?

Collapse
 
haroldv22 profile image
Harold Villalobos

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!!

Collapse
 
msamgan profile image
Mohammed Samgan Khan

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?

Collapse
 
pascalzim profile image
Josh • Edited

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).

Collapse
 
msamgan profile image
Mohammed Samgan Khan

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.

Collapse
 
pascalzim profile image
Josh

Yes, I solved the problem, thank you so much

Collapse
 
kcsuhail3 profile image
SUHAIL KC

Helpful

Collapse
 
msamgan profile image
Mohammed Samgan Khan • Edited

Thank you ...

Collapse
 
pitson3 profile image
Pitson Josiah MWakabila

Bravo!

Collapse
 
msamgan profile image
Mohammed Samgan Khan

thanks

Collapse
 
stefanyvl2210 profile image
Stefany

What command can I use instead of "npm install && npm run dev", I'm using windows

Collapse
 
msamgan profile image
Mohammed Samgan Khan

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

Collapse
 
stefanyvl2210 profile image
Stefany

Thanks 😊

Thread Thread
 
msamgan profile image
Mohammed Samgan Khan

happy to help

Collapse
 
rassloff profile image
Rassloff

Thanks