Views and templates

The package renders the sidebar with Blade views under the sidebar:: namespace. Three templates are included:

sidebar.view CSS framework
AdminLTE2 AdminLTE 2 / Bootstrap 3 (default)
AdminLTE3 AdminLTE 3 / Bootstrap 4
AdminLV AdminLV / Bootstrap 5
'view' => 'AdminLTE3',

AdminLV and Bootstrap 5

The AdminLV template uses the AdminLTE 3 markup with Bootstrap 5 badge classes. Bootstrap 3/4 badge classes are converted, so existing sidebars keep working:

Badge class Rendered as
none (default) bg-secondary
badge-danger, badge-success... bg-danger, bg-success...
bg-danger, text-bg-warning... unchanged

Use Font Awesome 6 classes for icons, e.g. fa-solid fa-users.

Customizing the views

Publish a template to resources/views/vendor/sidebar and edit it there. Published views win over the package views.

# The template selected in sidebar.view
php artisan vendor:publish --tag=sidebar-views

# A specific template
php artisan vendor:publish --tag=sidebar-views-adminlte2
php artisan vendor:publish --tag=sidebar-views-adminlte3
php artisan vendor:publish --tag=sidebar-views-adminlv

Caution

Publishing again with --force overwrites your edits.

View Variables
menu.blade.php $groups: rendered groups
group.blade.php $group, $items: rendered items
item.blade.php $item, $items (children), $badges, $appends, $active
badge.blade.php $badge
append.blade.php $append

For a completely different markup, see Custom renderers.