Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rchase's avatar

How to undo php artisan make:auth

I wasn't able to get Email Verification working in Spark, and a post I came across said to try php artisan make:auth. Well I did and now my site is toasted.

I tried undoing by removing the files and routes it created, but it still crashes: https://captifi.net/login

I don't know what else to do... any ideas?

0 likes
11 replies
Cronix's avatar

Typically I'd just rollback git to the last working commit, or use the diff between the two commits to help troubleshoot exactly what has changed.

1 like
esmaill23's avatar

Go to routes/web.php, delete the created routes by the command make:auth. Remove these two lines and your project will work fine as before.

Auth::routes();

Route::get('/home', 'HomeController@index');

and in /resource/views remove auth directory

also remove app/controller/Auth directory and user.php in app directory

if you use git you can role back simple without these steps.

1 like
rchase's avatar

It didn't work. But I was able to recover from a backup.

shedcollective's avatar

@esmaill23 is right - i would have said the same.. that is all make:auth does.. maybe it has few more AUth:: related code on view?

rchase's avatar

@SHEDCOLLECTIVE - Yeah I even opened up the make:auth function of php artisan and I reverted every thing it did and still couldn't get it restored. It was weird.

steve_laracasts's avatar

Silly question, did you run composer dump-autoload after making the changes?

steve_laracasts's avatar

Heh, well, was worth an ask :)

I forget these things sometimes... and don't half feel silly when I finally remember!

rchase's avatar

Yeah thanks for the suggestion, I actually found that as a recommendation when looking it up and tried it.

Please or to participate in this conversation.