sidebar:install

php artisan sidebar:install

Generates the sidebar class and config/sidebar.php from your answers:

Prompt Option Default
Cache method --cache=0|1|2 (null, static, user-based) 0
Cache duration (minutes) --duration= 1440
Template --template=0|1|2 (AdminLTE2, AdminLTE3, AdminLV) 0
Permission driver --permissions=0|1|2 (spatie, sentinel, none) 0
Sidebar class --class= App\Sidebars\AdminSidebar
Target view --target= admin.partials._sidebar
View data key --key= sidebar
Middleware alias --alias= sidebar
Publish the template views --publish-views no

The options also accept the names (--cache=static, --template=AdminLV, --permissions=none).

Non-interactive

php artisan sidebar:install --cache=1 --template=1 --permissions=2 --no-interaction

Existing files

If the class or the configuration already exists, the installer asks before replacing it (or keeps it with --no-interaction). --force replaces without asking. A replaced file is first copied to *.bak.

The user-based cache method is refused when the default cache store does not support tags.