Barryvdh\TranslationManager\ManagerServiceProvider::boot PHP Method

boot() public method

Bootstrap the application events.
public boot ( Router $router ) : void
$router Illuminate\Routing\Router
return void
    public function boot(Router $router)
    {
        $viewPath = __DIR__ . '/../resources/views';
        $this->loadViewsFrom($viewPath, 'translation-manager');
        $this->publishes([$viewPath => base_path('resources/views/vendor/translation-manager')], 'views');
        $migrationPath = __DIR__ . '/../database/migrations';
        $this->publishes([$migrationPath => base_path('database/migrations')], 'migrations');
        $config = $this->app['config']->get('translation-manager.route', []);
        $config['namespace'] = 'Barryvdh\\TranslationManager';
        $router->group($config, function ($router) {
            $router->get('view/{group?}', 'Controller@getView');
            $router->get('/{group?}', 'Controller@getIndex');
            $router->post('/add/{group}', 'Controller@postAdd');
            $router->post('/edit/{group}', 'Controller@postEdit');
            $router->post('/delete/{group}/{key}', 'Controller@postDelete');
            $router->post('/import', 'Controller@postImport');
            $router->post('/find', 'Controller@postFind');
            $router->post('/publish/{group}', 'Controller@postPublish');
        });
    }
ManagerServiceProvider