Skip to content

Publish Layout

Run Laravel UI Command

Run the following command to create basic scaffolding from it.

sh
composer require infyomlabs/laravel-ui-adminlte

Then Generate a full authentication UI,

sh
php artisan ui adminlte --auth

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

sh
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

sh
|- 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
  1. It will add following routes which need to get it work.
sh
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,

sh
npm install && npm run dev

For Production,

sh
npm install && npm run prod

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