Since Laravel 6.0, UI Scaffolding is moved to separate package called
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:^2.0 php artisan ui bootstrap --auth
This will generate Auth Controllers and layout files along with authentication blade view files.
As a next step, we need to run the generator's command to publish and overwrite default authentication file which was generated by
It will also generate new files for sidebar, menu etc.
php artisan infyom.publish:layout
For Localized Views, run it with the option
php artisan infyom.publish:layout --localized
This command generates following files,
It will publish
HomeControllerin controllers directory
It will publish views
|- resources |- views home.blade.php |- layouts |- app.blade.php |- menu.blade.php |- sidebar.blade.php |- auth |- login.blade.php |- register.blade.php |- passwords |- email.blade.php |- reset.blade.php
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
Now we are all set and you can check basic scaffolding.