-
Notifications
You must be signed in to change notification settings - Fork 58
Upgrade guide
Patrick Brouwers edited this page Jun 21, 2015
·
8 revisions
- The purpose of the
SidebarManager
is changed. The manager is now only responsible for registering the Sidebar, not for building. - Instead of directly building the menu in
$manager->build()
, you will have to create a new class which implementsMaatwebsite\Sidebar\Sidebar
. Register this custom Sidebar with the manager:$manager->register(YourSidebar::class);
(See full example in Wiki) - To render your Sidebar (in a view creator for example) you will have to inject your custom Sidebar class and
Maatwebsite\Sidebar\Presentation\SidebarRenderer
and render like$this->renderer->render($this->sidebar)
(See full example in Wiki) - It's no longer possible to use multiple view composers to fill the sidebar, due to caching implementation. Instead create a new class that extends
Maatwebsite\Sidebar\SidebarExtender
and add it to your Sidebar. (See full example in Wiki)