Ejemplo n.º 1
0
 /**
  * Register any application authentication / authorization services.
  * @param  \Illuminate\Contracts\Auth\Access\Gate  $gate
  * @return void
  */
 public function boot(GateContract $gate, Extender $extender)
 {
     foreach ($extender->getModels() as $class) {
         $this->policies[$class] = ModelPolicy::class;
     }
     $this->registerPolicies($gate);
 }
Ejemplo n.º 2
0
 /**
  * Install the model blueprints.
  * @return void
  */
 public function boot_models(Extender $extender)
 {
     FieldBlueprint::boot();
     foreach ($extender->getModules() as $class => $module) {
         $name = "{$module->name}.config.php";
         if (file_exists(base_path("cms/conf/{$name}"))) {
             include base_path("cms/conf/{$name}");
         }
     }
 }
 /**
  * Register the application services.
  *
  * @return void
  */
 public function register()
 {
     $this->app->singleton(Extender::class, function ($app) {
         $extender = new Extender($app);
         $modules = config('app.modules');
         foreach ($modules as $module) {
             $extender->register($module);
         }
         return $extender;
     });
 }
Ejemplo n.º 4
0
 /**
  * Add a route.
  * @param $config string route config handle
  * @param $callable callable for Route::group
  * @return $this
  */
 public function route($config, $callable)
 {
     $this->extender->route($config, $callable);
     return $this;
 }