How to remove Auth in Laravel (PHP artisan)

Check the make:auth command's source to understand the files created by it or the changes.

You will need to delete these files

  1. auth/login.blade.php
  2. auth/register.blade.php
  3. auth/passwords/email.blade.php
  4. auth/passwords/reset.blade.php
  5. layouts/app.blade.php
  6. home.blade.php

Once that is done

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

Auth::routes();

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

Look at the make:auth command source code to understand what exactly files this command added or changed and revert the changes back.

As you can see, you should remove some views and couple of the controllers.

auth/login.blade.php
auth/register.blade.php
auth/passwords/email.blade.php
auth/passwords/reset.blade.php
layouts/app.blade.php
home.blade.php

You need to remove user table from database. Also remove migrations entry from migrate tables. and than comment route code of auth from web.php file in route folder. like

Auth::routes();

also comment middleware from HomeController __construct() function.

$this->middleware('auth');