Amranidev\ScaffoldInterface\ScaffoldInterfaceServiceProvider::boot PHP Method

boot() public method

Bootstrap the application events.
public boot ( ) : void
return void
    public function boot()
    {
        // Get namespace.
        $nameSpace = $this->app->getNamespace();
        // Set namespace alias for AppController.
        AliasLoader::getInstance()->alias('AppController', $nameSpace . 'Http\\Controllers\\Controller');
        // Routes.
        $this->app->router->group(['namespace' => $nameSpace . 'Http\\Controllers'], function () {
            require __DIR__ . '/Http/routes.php';
        });
        // Public
        $this->publishes([__DIR__ . '/../public' => public_path()], 'public');
        // Views
        $this->publishes([__DIR__ . '/Publishes/Views' => base_path('/resources/views')], 'views');
        $this->publishes([__DIR__ . '/Publishes/Controllers' => app_path('/Http/Controllers')], 'Controllers');
        // Load views.
        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'scaffold-interface');
        // Migrations.
        $this->publishes([__DIR__ . '/../database/migrations/' => database_path('migrations')], 'migrations');
        //config path.
        $configPath = __DIR__ . '/../config/config.php';
        //Register config.
        $this->publishes([$configPath => config_path('amranidev/config.php')]);
    }
ScaffoldInterfaceServiceProvider