Appzcoder\LaravelAdmin\LaravelAdminServiceProvider::boot PHP Method

boot() public method

Perform post-registration booting of services.
public boot ( Router $router ) : void
$router Illuminate\Routing\Router
return void
    public function boot(\Illuminate\Routing\Router $router)
    {
        $this->publishes([__DIR__ . '/publish/Middleware/' => app_path('Http/Middleware')]);
        $this->publishes([__DIR__ . '/publish/migrations/' => database_path('migrations')]);
        $this->publishes([__DIR__ . '/publish/Model/' => app_path()]);
        $this->publishes([__DIR__ . '/publish/Controllers/' => app_path('Http/Controllers')]);
        $this->publishes([__DIR__ . '/publish/views/' => base_path('resources/views')]);
        $this->publishes([__DIR__ . '/publish/resources/' => base_path('resources')]);
        $this->publishes([__DIR__ . '/publish/crudgenerator.php' => config_path('crudgenerator.php')]);
        $router->middleware('roles', \App\Http\Middleware\CheckRole::class);
        include __DIR__ . '/routes.php';
        $menus = [];
        if (File::exists(base_path('resources/laravel-admin/menus.json'))) {
            $menus = json_decode(File::get(base_path('resources/laravel-admin/menus.json')));
            view()->share('laravelAdminMenus', $menus);
        }
    }
LaravelAdminServiceProvider