/** * Bootstrap the application events. * * @return void */ public function boot() { $this->package('vizioart/cookbook'); //define a constant that the rest of the package can use to conditionally use pieces of Laravel 4.1.x vs. 4.0.x $this->app['cookbook.4.1'] = version_compare(\Illuminate\Foundation\Application::VERSION, '4.1') > -1; //set up an alias for the base laravel controller to accommodate >=4.1 and <4.1 if (!class_exists('LaravelBaseController')) { // Verify alias is not already created if ($this->app['cookbook.4.1']) { class_alias('Illuminate\\Routing\\Controller', 'LaravelBaseController'); } else { class_alias('Illuminate\\Routing\\Controllers\\Controller', 'LaravelBaseController'); } } // Repositories // -------------------------------------------------------------- $this->bootRepositories(); // Handlebars Templates // -------------------------------------------------------------- $frontend_templates_path = public_path() . DIRECTORY_SEPARATOR . $this->app['config']->get('cookbook::cookbook.front_templates'); View::addNamespace('hbs', $frontend_templates_path); include __DIR__ . '/../../filters.php'; include __DIR__ . '/../../viewComposer.php'; include __DIR__ . '/../../routes.php'; }
/** * Register the service provider. * * @return void */ public function register() { parent::register(); $this->registerAliases(); $this->requireFiles($this->filesToRegister); // Define view namespace, as $this->package() doesn't exist anymore in L5 View::addNamespace('shift', realpath(__DIR__ . '/../../views')); }
/** * Bootstrap the application events. * * @return void */ public function boot() { $this->publishes([__DIR__ . '/../../../public' => public_path('packages/devnullsoftware/api-generator')], 'public'); View::addNamespace('ApiGenerator', __DIR__ . '/../../views'); if (env('EXPOSE_APIS', true)) { Route::get('/apis', 'DevnullSoftware\\ApiGenerator\\DocsController@apis2Welcome'); Route::get('apis/data', 'DevnullSoftware\\ApiGenerator\\DocsController@apis'); Route::get('/apis/{api}', 'DevnullSoftware\\ApiGenerator\\DocsController@apis2'); } }
public function __construct() { $this->config = (include __DIR__ . '/../Config/cms.php'); $this->sitemap = new Sitemap(); $this->tree = $this->sitemap->getNestedArrayOfAllPages(); $templateViewDir = __DIR__ . '/../Templates'; $adminViewDir = __DIR__ . '/../Views'; View::addNamespace('cms', $templateViewDir); View::addNamespace('cmsAdmin', $adminViewDir); }
/** * Register the service provider. * * @return void */ public function register() { $this->package('selmonal/imagemanager'); $path = realpath(__DIR__ . "/../../views"); // naming views View::addNamespace('SIM', $path); App::bind('Selmonal\\Imagemanager\\ImageRepositoryInterface', 'Selmonal\\Imagemanager\\EloquentImageRepository'); // Intervention image manipulator App::register("Intervention\\Image\\ImageServiceProvider"); $this->app->bind("Selmonal\\Imagemanager\\ImageManipulator", function () { $basePath = public_path() . Config::get("imagemanager::basePath"); $sizes = Config::get("imagemanager::sizes"); return new \Selmonal\Imagemanager\ImageManipulator($basePath, $sizes); }); }
/** * Bootstrap the application services. * * @return void */ public function boot() { if (!$this->app->routesAreCached()) { $this->map(); } View::addNamespace('TrungtnmBackend', __DIR__ . '/resources/views'); $this->loadViewsFrom(base_path('resources/views/trungtnm/backend'), 'TrungtnmBackend'); $this->loadViewsFrom(__DIR__ . '/resources/views', 'TrungtnmBackend'); //publish views, configs $this->publishes([__DIR__ . '/resources/views' => base_path('resources/views/trungtnm/backend')]); $this->publishes([__DIR__ . '/resources/assets' => public_path('vendor/trungtnm/backend')], 'public'); $this->publishes([__DIR__ . '/config/trungtnm.backend.php' => config_path('trungtnm.backend.php')], 'config'); $this->mergeConfigFrom(__DIR__ . '/config/trungtnm.backend.php', 'trungtnm.backend'); $this->filterPermission(); $this->extendValidator(); }
/** * Bootstrap the application events. * * @return void */ public function boot() { $this->package('cherryoff/nbblog'); /** * Регистрируем наши роуты */ include __DIR__ . '/../../routes.php'; /** * Подключаем собственный viewComposers */ include __DIR__ . '/../../viewComposers.php'; /** * Разрешаем обращаться к видам вне модуля */ View::addNamespace('blog', __DIR__ . '/../../views'); }
/** * Alias the services in the boot. * * @return void */ public function boot() { $this->publishes([__DIR__ . '/PublishedAssets/Views/themes' => base_path('resources/themes'), __DIR__ . '/PublishedAssets/Controllers' => app_path('Http/Controllers/Quarx'), __DIR__ . '/Migrations' => base_path('database/migrations'), __DIR__ . '/PublishedAssets/Middleware' => app_path('Http/Middleware'), __DIR__ . '/PublishedAssets/Routes' => base_path('routes'), __DIR__ . '/PublishedAssets/Config' => base_path('config')]); $theme = Config::get('quarx.frontend-theme', 'default'); $this->loadViewsFrom(__DIR__ . '/Views', 'quarx'); View::addLocation(base_path('resources/themes/' . $theme)); View::addNamespace('quarx-frontend', base_path('resources/themes/' . $theme)); /* |-------------------------------------------------------------------------- | Blade Directives |-------------------------------------------------------------------------- */ Blade::directive('theme', function ($expression) { if (Str::startsWith($expression, '(')) { $expression = substr($expression, 1, -1); } $theme = Config::get('quarx.frontend-theme'); $view = '"quarx-frontend::' . str_replace('"', '', str_replace("'", '', $expression)) . '"'; return "<?php echo \$__env->make({$view}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; }); Blade::directive('menu', function ($expression) { return "<?php echo Quarx::menu({$expression}); ?>"; }); Blade::directive('widget', function ($expression) { return "<?php echo Quarx::widget({$expression}); ?>"; }); Blade::directive('images', function ($expression) { return "<?php echo Quarx::images({$expression}); ?>"; }); Blade::directive('edit', function ($expression) { return "<?php echo Quarx::editBtn({$expression}); ?>"; }); Blade::directive('markdown', function ($expression) { return "<?php echo Markdown::convertToHtml({$expression}); ?>"; }); }
/** * Register the service provider. * * @return void */ public function register() { View::addNamespace('profile', __DIR__ . '/../../views'); }
public function __construct() { View::addNamespace('frontend', __DIR__ . '/../views'); }
public function __construct($currentPageObject) { $this->currentPageObject = $currentPageObject; View::addNamespace('pageControls', __DIR__ . '/views'); }
/** * Define your route model bindings, pattern filters, etc. * * @param \Illuminate\Routing\Router $router * @return void */ public function boot(Router $router) { // View::addNamespace('Theme', base_path() . '/themes/' . env('THEME') . '/views'); parent::boot($router); }
/** * Bootstrap any application services. * * @return void */ public function boot() { View::addNamespace('admin', app_path('Modules/Admin/Views')); View::addNamespace('user', app_path('Modules/User/Views')); View::addNamespace('shared', app_path('Modules/Shared/Views')); }
protected function registerViews() { View::addNamespace('Hourglass.Backend', base_path('hourglass/resources/views')); }
public function boot(Router $router) { Lang::addNamespace('_GHBaseComponent', __DIR__ . '/../../resources/lang'); View::addNamespace('_GHBaseComponent', __DIR__ . '/../../resources/views'); parent::boot($router); }
public function boot(Router $router) { Lang::addNamespace(self::$componentNamespace, __DIR__ . '/../../resources/lang'); View::addNamespace(self::$componentNamespace, __DIR__ . '/../../resources/views'); parent::boot($router); }
public function themeSetup() { if (true === Config::get('talk::theme.own')) { View::addNamespace('talk', app_path() . '/views/talk/' . Config::get('talk::theme.name')); } }
/** * Register any application services. * * @return void */ public function register() { // View::addNamespace('employee', '/app/ThunderID/EmploymentSystemV1/Views'); }
/** * Register the service provider. * * @return void */ public function register() { View::addNamespace('questions', __DIR__ . '/../../views'); }
public function __construct(PageRepositoryInterface $page) { $this->page = $page; View::addNamespace('backend', __DIR__ . '/../views'); }