wikigods/laravel-sidebar 1.0 is the continuation of maatwebsite/laravel-sidebar 3.x. The API is the same; the package name and the namespace change.
composer remove maatwebsite/laravel-sidebar
composer require wikigods/laravel-sidebar
If you registered Maatwebsite\Sidebar\SidebarServiceProvider by hand in config/app.php or bootstrap/providers.php, remove it: the new provider is discovered automatically.
Replace Maatwebsite\Sidebar with Wikigods\Sidebar in your application (sidebar classes, extenders, config/sidebar.php, event listeners):
- use Maatwebsite\Sidebar\Menu;
+ use Wikigods\Sidebar\Menu;
The package registers the sidebar route middleware alias. If your application registered Maatwebsite\Sidebar\Middleware\ResolveSidebars itself, remove that registration and use the alias:
Route::middleware(['auth', 'sidebar'])->group(function () {
// ...
});
Compare your config/sidebar.php with the new one (php artisan vendor:publish --tag=sidebar-config --force overwrites it; back it up first). New keys: sidebar (class, view and key), middleware and permissions. See Configuration.
sidebar.cache.duration is now applied in minutes, as documented. Earlier versions passed it to the cache store as seconds, so the default 1440 kept the sidebar for 24 minutes. With 1.0 the same value keeps it for one day; lower it if you relied on the shorter time.
ShouldCache no longer extends PHP's deprecated Serializable interface. If your sidebar uses CacheableTrait, nothing changes. If it implements serialize() / unserialize() itself, implement __serialize(): array and __unserialize(array $data): void instead.
Clear the cache after upgrading, since entries stored by the old package reference the old class names:
php artisan cache:clear
Maatwebsite\Sidebar\Console\* is now Wikigods\Sidebar\Commands\*.