Laravel changes in php artisan ui:auth php artisan make:auth

rollback undo effects of php artisan ui:auth php artisan make:auth

Sometimes you need to figure out what happens behind the scene when running Laravel auth scaffolding commands.

Note: First, I deal with Larvel 5.8 and older versions as the base and then compare changes with Laravel 6 using different commands of ui:auth.

I: Laravel 5.8 and older

In old version of Laravel after doing

Some changes happen as the following screenshot.

How these changes actually happen? Do you want to know? You should read the core command file in this path:

only in routes/web.php some lines is added as follow:

In order to Rollback them you should delete the created routes by removing these two lines.

and also some class files are created as follow that you should consider.

Controller file

  • app/Http/Controllers/HomeController.php

View Files

I: Login, Register, Getting Verification Email

  • resources/views/auth/login.blade.php
  • resources/views/auth/register.blade.php
  • resources/views/auth/verify.blade.php

II: Password

  • resources/views/auth/passwords/email.blade.php
  • resources/views/auth/passwords/reset.blade.php

III: Home and main app layout

  • resources/views/home.blade.php
  • resources/views/layouts/app.blade.php

II: Laravel 6:

As you now in Laravel 6, refer here , there are some commands for auth scaffolding:

I want to show you changes happen in each command one by one.

If you want to know the changes happen you should have a look at AuthCommand.php file in this path after installing laravel/ui:

Part 0 — Laravel 6 — Auth Scaffolding Shorthand

If you update laravel/installer to v2.3.0 you can do:

How to update laravel/installer : read here

Which is the shorthand of four following commands:

To initialize the Laravel project you need to:

Part 1— Laravel 6 —Only make view files

After doing:

You can generate the auth views only with:

Some changes happen as follow:

As you see there is no changes in web.php since the command is not responsible for making routes and controller.

And also one new file is created more than what happens in Larvel 5.8 and older as follow:

View File

Password

  • resources/views/auth/passwords/confirm.blade.php

Part 2 — Laravel 6 — ui:auth

After doing:

Some changes happen as follow:

Lets check the changes in

  • web.php : the changes is the same as in Laravel 5.8 and older

And also one new file is created more than what happens in Part 1 — Laravel 6 — Only make view files is created as follow:

Controller file

  • app/Http/Controllers/HomeController.php

Part 3 - Laravel 6 — bootstrap

After doing:

Some changes happen as follow:

Lets check the changes in

  • package.json
  • bootstrap.js
  • app.css
  • web.php : the changes is the same as in Laravel 5.8 and older

And also one new file is created more than what happens in Part 2 — Laravel 6 — ui:auth are created as follow:

SCSS file

  • resources/sass/_variables.scss

Attention:

If you do only this:

You will see this changes only without any auth scaffolding:

Part 4 — Laravel 6 — vue

After doing:

Some changes happen as follow:

Lets check the changes in

  • package.json
  • app.js
  • bootstrap.js : the changes is the same as Part 3 — Laravel 6 — bootstrap
  • app.css : the changes is the same as Part 3 — Laravel 6 — bootstrap
  • web.php: the changes is the same as Part 3 — Laravel 6 — bootstrap
  • webpack.mix.js has not changed and only a space is removed

And also one new file is created more than what happens in Part 3 — Laravel 6 — bootstrap is created as follow:

js file

  • resources/js/components/ExampleComponent.vue

Attention:

If you do only this:

You will see this changes only without any auth scaffolding:

Written by

Web geek, Self-taught full-stack web developer, Learning Python, Laravel, Vuejs, UX/UI design, Nuclear Physicist PhD

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store