Generator

Publish Layout

TABLE OF CONTENT
  1. Install Laravel UI
  2. Run Publish Layout Command
  3. Check Published Stuff
  4. Menu Configuration

Install Laravel UI

Since Laravel 6.0, UI Scaffolding is moved to separate package called laravel/ui.

So first we need to install laravel/ui package and create basic scaffolding from it. Which will be later on replaced by our templates scaffolding.

composer require laravel/ui:^3.0 php artisan ui bootstrap --auth

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

Run Publish Layout Command

As a next step, we need to run the generator's command to publish and overwrite default authentication file which was generated by laravel/ui package.

It will also generate new files for sidebar, menu etc.

php artisan infyom.publish:layout

For Localized Views, run it with the option --localized

php artisan infyom.publish:layout --localized

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 |- login.blade.php |- register.blade.php |- reset.blade.php |- password.blade.php
  3. It will add following routes which need to get it work.

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

Now, you have to enable menu option in config/infyom/laravel_generator.php. Make menu option true.

'add_on' => [ 'menu' => [ 'enabled' => true ] ]

add_on.menu.menu_file is where menu for particular module will be added. If you want to customize it then you can customize it. It will take a respective path from views folder you configured in laravel_generator.php.

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