/**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     $this->bootPublish();
     // Extends Url Generator
     $this->app->bind('url', function ($app) {
         return new UrlGenerator($app['router']->getRoutes(), $app['request']);
     });
     $this->app->bind('Illuminate\\Routing\\ResourceRegistrar', function ($app) {
         return new ResourceRegistrar($app['router']);
     });
     try {
         Site::init();
         $router = $this->app['router'];
         $config = $this->app['config'];
         // DEBUG BAR
         liveCMSRouter($router, function ($router, $adminSlug, $subDomain, $subFolder) use($config) {
             // EXTEND ROUTER
             $router->group(['namespace' => 'LiveCMS\\Controllers'], function ($router) use($adminSlug, $subDomain, $subFolder) {
                 require $this->baseDir() . '/routebases.php';
             });
         });
     } catch (\Exception $e) {
         throw new \Exception('Error in LiveCMSServiceProvider : ' . $e->getMessage());
     }
 }
Beispiel #2
0
 public function save(array $options = [])
 {
     return parent::save($options);
 }