FleetCart/Modules/Admin/Providers/SidebarServiceProvider.php

31 lines
749 B
PHP
Raw Normal View History

2023-06-11 12:14:03 +00:00
<?php
namespace Modules\Admin\Providers;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
use Maatwebsite\Sidebar\SidebarManager;
use Modules\Admin\Sidebar\AdminSidebar;
use Modules\Admin\Http\ViewCreators\AdminSidebarCreator;
class SidebarServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(SidebarManager $manager)
{
if (! config('app.installed')) {
return;
}
if ($this->app['inAdminPanel']) {
$manager->register(AdminSidebar::class);
}
View::creator('admin::partials.sidebar', AdminSidebarCreator::class);
}
}