Publish Layout

  1. Run Laravel UI Command
  2. Check Published Stuff
  3. Build Assets

Run Laravel UI Command

Then Generate a full authentication UI,

php artisan ui adminlte --auth

If you want to use localization, then run the following command,

php artisan ui adminlte-localized --auth

This will generate Auth Controllers and layout files along with authentication blade view files.

It uses the same configuration as per laravel/ui package for auth scaffold generation.

Check Published Stuff

This command generates following files,

  1. It will publish HomeController in controllers directory

  2. It will publish views

    |- resources |- views home.blade.php |- layouts |- app.blade.php |- menu.blade.php |- sidebar.blade.php |- emails |- password.blade.php |- auth |- passwords |- confirm.blade.php |- email.blade.php |- reset.blade.php |- login.blade.php |- register.blade.php |- verify.blade.php
  3. It will add following routes which need to get it work.

Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); Auth::routes();

Build Assets

As a next step, we need to install npm dependencies and build the assets with the following command,

npm install && npm run dev

For Production,

npm install && npm run prod

Now we are all set, and you can check basic auth scaffolding.