当前位置: 首页>>代码示例>>PHP>>正文


PHP View::composer方法代码示例

本文整理汇总了PHP中Illuminate\Support\Facades\View::composer方法的典型用法代码示例。如果您正苦于以下问题:PHP View::composer方法的具体用法?PHP View::composer怎么用?PHP View::composer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Support\Facades\View的用法示例。


在下文中一共展示了View::composer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: boot

 /**
  * Boot the application events.
  * 
  * @return void
  */
 public function boot()
 {
     $this->registerConfig();
     $this->registerTranslations();
     $this->registerViews();
     View::composer(['partials.header'], 'Modules\\Notifications\\Http\\ViewComposers\\NotificationComposer');
 }
开发者ID:gitfreengers,项目名称:larus,代码行数:12,代码来源:NotificationsServiceProvider.php

示例2: shareFis

 protected function shareFis()
 {
     $fis = $this->app->make('fis');
     View::composer('*', function ($view) use($fis) {
         $view->with('__fis', $fis);
     });
 }
开发者ID:fex-team,项目名称:laravel-fis,代码行数:7,代码来源:ResourceProvider.php

示例3: boot

 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     View::composer('*', function ($view) {
         $view->with('currentUser', Auth::user());
         $view->with('signedIn', Auth::user());
     });
 }
开发者ID:WeirdOne1977,项目名称:Larabook-5.1,代码行数:12,代码来源:AppServiceProvider.php

示例4: setupLayout

 protected function setupLayout()
 {
     $is_rapyd = (Request::server('HTTP_HOST') == "www.rapyd.com") ? true : false;
     View::composer('rapyd::demo.*', function ($view) use ($is_rapyd) {
         $view->with('is_rapyd', $is_rapyd);
     });
 }
开发者ID:simplylouis,项目名称:online_book_shop_20151110_laravel_5,代码行数:7,代码来源:DemoController.php

示例5: __construct

 public function __construct()
 {
     //$this->beforeFilter(function(){  });
     $this->uriSegment = null;
     $this->modelName = null;
     $this->viewsPath = null;
     $this->resourceId = null;
     if (Route::input('alias') !== null) {
         $this->uriSegment = Route::input('alias');
         $this->viewsPath = File::exists(app_path('views/' . Config::get('reactiveadmin::uri') . '/' . $this->uriSegment)) ? Config::get('reactiveadmin::uri') . '.' . $this->uriSegment : 'reactiveadmin::default';
         $this->modelName = studly_case(str_singular(Route::input('alias')));
         $this->modelWrapper = App::make('model_wrapper');
         $this->modelWrapper->model($this->modelName);
         if (Route::input('id') !== null) {
             $this->resourceId = Route::input('id');
         }
         View::share('config', $this->modelWrapper->getConfig());
         // TODO: refactor this!
         // custom behavior
         switch ($this->uriSegment) {
             case 'settings':
                 View::composer(array('admin.' . $this->viewsPath . '.index'), function ($view) {
                     $view->with('settings', Settings::all());
                 });
                 break;
             default:
                 # code...
                 break;
         }
     }
     View::share('view', $this->uriSegment);
     View::share('model', $this->modelName);
 }
开发者ID:verticalhorizon,项目名称:reactiveadmin,代码行数:33,代码来源:AdminController.php

示例6: setWidgetComposer

 private function setWidgetComposer($widget)
 {
     View::composer('dashboard.dashboard', function ($view) use($widget) {
         $view->with('widget', $widget);
     });
     return $this;
 }
开发者ID:gitfreengers,项目名称:larus,代码行数:7,代码来源:SimpleTestServiceProvider.php

示例7: register

 /**
  * Register any application services.
  *
  * @return void
  */
 public function register()
 {
     $this->app->bind('App\\Lambda\\Repositories\\LambdaRepositoryInterface', 'App\\Lambda\\Repositories\\LambdaRepository');
     // $this->app->bind('App\Lambda\Billing\BillingInterface', 'App\Lambda\Billing\StripeBilling');
     View::composer('partials.sidebar', 'App\\Lambda\\Composers\\SidebarComposer');
     View::composer(['partials.admin-sidebar', 'dashboard/*'], 'App\\Lambda\\Composers\\AccountSidebarComposer');
     View::composer(['partials.nav', 'errors/404'], 'App\\Lambda\\Composers\\NavComposer');
 }
开发者ID:scotthummel,项目名称:lambdaphx,代码行数:13,代码来源:AppServiceProvider.php

示例8: boot

 /**
  * @return void
  */
 public function boot()
 {
     $this->loadViewsFrom(__DIR__ . '/../../views', 'yandex-kassa');
     $this->publishes([__DIR__ . '/../../config/yandex_kassa.php' => config_path('yandex_kassa.php')]);
     $this->publishes([__DIR__ . '/../../database/migrations/' => database_path('/migrations/yandex_kassa')], 'migrations');
     include __DIR__ . '/../routes.php';
     View::composer(config('yandex_kassa.form_view'), SettingsComposer::class);
 }
开发者ID:cawakharkov,项目名称:yandex-kassa,代码行数:11,代码来源:YandexKassaServiceProvider.php

示例9: boot

 /**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     View::composer('backend.left-sidebar', function ($view) {
         $menuItems = new MenuItems();
         $menuItems = $menuItems->generate();
         $view->with(compact('menuItems'));
     });
 }
开发者ID:johnleider,项目名称:laravel-admin-lte,代码行数:13,代码来源:ComposerServiceProvider.php

示例10: boot

 /**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     View::composer(array('welcome', 'profile.profile', 'partials.head_profile', 'calc.index'), 'App\\Composers\\UserComposer');
     View::composer(['profile.profile', 'request.create', 'partials.head_profile', 'calc.index'], 'App\\Composers\\PercentComposer');
     View::composer(['profile.profile', 'request.create', 'partials.head_profile', 'calc.index'], 'App\\Composers\\CourseComposer');
     View::composer('request.create', 'App\\Composers\\DaysComposer');
     View::composer('layouts.profile_layout', 'App\\Composers\\ProfileComposer');
     View::composer(['profile.profile', 'welcome'], 'App\\Composers\\PlansComposer');
 }
开发者ID:lyovkin,项目名称:elcoinbank,代码行数:14,代码来源:ComposerServiceProvider.php

示例11: boot

 /**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     View::composer('welcome', 'App\\View\\Composers\\AdvComposer');
     View::composer(['favorites.index', 'ads.my', 'home'], 'App\\View\\Composers\\AdvComposer');
     View::composer('slider.slider', 'App\\View\\Composers\\CategoryComposer');
     View::composer('slider.slider', 'App\\View\\Composers\\CityComposer');
     View::composer('slider.slider', 'App\\View\\Composers\\TypeComposer');
     View::composer('slider.slide', 'App\\View\\Composers\\SliderComposer');
 }
开发者ID:lyovkin,项目名称:v2board,代码行数:14,代码来源:ComposerServiceProvider.php

示例12: boot

 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     //
     View::composer(['front.includes.header'], function ($view) {
         $model = new Category();
         $categories = $model->getCategoryTree();
         $view->with('categories', $categories);
     });
 }
开发者ID:virendrayadav,项目名称:styleexpert,代码行数:14,代码来源:AppServiceProvider.php

示例13: boot

 /**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     /**
      * recibe 2 parametros
      * 1. la vista o las vistas.
      * 2. Namespace del view composer
      */
     View::composer(['front.index', 'front.article', 'front.content'], 'App\\Http\\ViewComposers\\AsideComposer');
 }
开发者ID:JhonatanC,项目名称:laravelcodfa,代码行数:14,代码来源:ComposerServiceProvider.php

示例14: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     // custom namespace
     $this->package('alexwenzel/laravel-commentary', 'laravel-commentary');
     // comment list composer
     View::composer('laravel-commentary::comment-list', function ($view) {
         $entity = $view->entity;
         $comments = Comment::where('entity', $entity)->where('status', Comment::statusApproved)->orderBy('created_at', 'desc')->get();
         $view->with('comments', $comments);
     });
 }
开发者ID:alexwenzel,项目名称:laravel-commentary,代码行数:16,代码来源:LaravelCommentaryServiceProvider.php

示例15: boot

 /**
  * Bootstrap the application events.
  *
  * @return void
  */
 public function boot()
 {
     View::composer('nav', 'App\\Composers\\ViewComposer@navigation');
     View::composer('modules.latest-musics', 'App\\Composers\\ViewComposer@latestMusicsModule');
     View::composer('modules.latest-videos', 'App\\Composers\\ViewComposer@latestVideosModule');
     View::composer('modules.latest-users', 'App\\Composers\\ViewComposer@latestUsersModule');
     View::composer('modules.top-musics', 'App\\Composers\\ViewComposer@topMusicsModule');
     View::composer('modules.top-videos', 'App\\Composers\\ViewComposer@topVideosModule');
     View::composer('modules.top-users', 'App\\Composers\\ViewComposer@topUsersModule');
     View::composer('cats.list-cats', 'App\\Composers\\ViewComposer@catModule');
 }
开发者ID:jgbneatdesign,项目名称:tikwenpam,代码行数:16,代码来源:TKPMServiceProvider.php


注:本文中的Illuminate\Support\Facades\View::composer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。