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'); }
/** * 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'])); } } }
/** * 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')); }