/**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     $this->package('darsain/laravel-console');
     $src_path = __DIR__ . '/../../';
     // Routes
     require $src_path . 'routes.php';
     // Attach Console events
     Console::attach();
 }
Пример #2
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     if ($this->app['request']->is('console') and $this->app['request']->getMethod() == 'POST') {
         $this->app->singleton('Illuminate\\Contracts\\Debug\\ExceptionHandler', 'Darsain\\Console\\Handler');
     }
     $configPath = __DIR__ . '/../../config/config.php';
     $routePath = __DIR__ . '/../../routes.php';
     $viewPath = __DIR__ . '/../../views';
     $this->mergeConfigFrom($configPath, 'console');
     $this->loadViewsFrom($viewPath, 'console');
     // Routes
     require $routePath;
     // Attach Console events
     Console::attach();
 }