private function requireAssets()
 {
     $this->assetManager->addAsset('bootstrap-editable.css', Module::asset('translation:vendor/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css'));
     $this->assetManager->addAsset('bootstrap-editable.js', Module::asset('translation:vendor/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min.js'));
     $this->assetPipeline->requireJs('bootstrap-editable.js');
     $this->assetPipeline->requireCss('bootstrap-editable.css');
 }
Esempio n. 2
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $modules = Module::all();
     $this->call('module:migrate');
     foreach ($modules as $module) {
         $this->call('module:seed', ['module' => $module->name]);
     }
 }
Esempio n. 3
0
 /**
  * Add the assets from the config file on the asset manager
  */
 private function addAssets()
 {
     foreach (config('asgard.core.core.admin-assets') as $assetName => $path) {
         if (key($path) == 'theme') {
             $this->assetManager->addAsset($assetName, Theme::url($path['theme']));
         } else {
             $this->assetManager->addAsset($assetName, Module::asset($path['module']));
         }
     }
 }
Esempio n. 4
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $modules = Module::getOrdered();
     $this->info('Generate Key');
     $this->call('key:generate');
     $this->info('Migrations Basics');
     $this->call('migrate');
     $this->info('Executing Seeders');
     $this->call('db:seed');
     $this->info('Executing Migrations Modules');
     $this->call('module:migrate');
     $this->info('Executing Seeders Modules');
     foreach ($modules as $module) {
         $this->info("Executing Seed for module {$module->name}");
         $this->call('module:seed', ['module' => $module->name]);
     }
 }
Esempio n. 5
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $modules = Module::getOrdered();
     $this->info('Generate Key');
     $this->call('key:generate');
     $this->info('Migrations Basics');
     $this->call('migrate');
     $this->info('Executing Seeders');
     $this->call('db:seed');
     $this->info('Executing Migrations Modules');
     $this->call('module:migrate');
     $this->info('Executing Seeders Modules');
     foreach ($modules as $module) {
         $this->info("Executing Seed for module {$module->name}");
         $this->call('module:seed', ['module' => $module->name]);
     }
     $this->info('Activate theme: Default');
     \Theme::set('default');
     $this->info('Publish assets themes');
     $this->call('theme:publish');
 }
 /**
  * Boot the application events.
  * 
  * @return void
  */
 public function boot()
 {
     $this->registerConfig();
     $this->registerTranslations();
     $this->registerViews();
     if (collect(Analytics::find(1))->contains(1)) {
         view()->share('analytics', Analytics::find(1));
     }
     if (collect(Configuracao::find(1))->contains(1)) {
         view()->share('confsite', Configuracao::find(1));
     }
     if (collect(Comentarios::where('id_status_comentario', 1)->get())->count()) {
         view()->share('comments', collect(Comentarios::where('id_status_comentario', 1)->get())->count());
     }
     view()->share('sobre', Sobres::findOrFail(1));
     if (Request::is('blog') or Request::is('blog/*')) {
         view()->share('categorias', Categoria::where('id_tipo_categoria', 3)->get());
         view()->share('ultimas', collect(Noticia::todas())->take(4));
     }
     if (Request::is('admin') or Request::is('admin/*')) {
         view()->share('ajuda', Helps::all());
     }
     view()->share('assets', Module::asset('Admin:webroot'));
 }
 /**
  *
  */
 public function __construct()
 {
     $this->module = Module::find('users');
 }
Esempio n. 8
0
 /**
  * returns a collection of all installed modules
  * ordered by priority.
  *
  * @return Collection
  */
 private function getModules()
 {
     return collect(Module::getOrdered());
 }