本文整理汇总了PHP中Illuminate\Contracts\View\Factory::composer方法的典型用法代码示例。如果您正苦于以下问题:PHP Factory::composer方法的具体用法?PHP Factory::composer怎么用?PHP Factory::composer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\View\Factory
的用法示例。
在下文中一共展示了Factory::composer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: boot
/**
* Register bindings in the container.
*
* @return void
*/
public function boot(ViewFactory $view)
{
$view->composer('*', 'App\\Http\\ViewComposers\\GlobalComposer');
$view->composer(['report.create', 'report.view', 'report.IncompleteApproval', 'report.incomplete', 'report.QaVerification'], 'App\\Http\\ViewComposers\\FormOptionComposer');
$view->composer(['report.view', 'pdf.print', 'report.IncompleteApproval', 'report.incomplete', 'report.QaVerification'], 'App\\Http\\ViewComposers\\RecordUpdateComposer');
$view->composer(['home', 'admin.pages.index'], 'App\\Http\\ViewComposers\\HomeComposer');
$view->composer(['home.pareto', 'admin.pages.index'], 'App\\Http\\ViewComposers\\HomeComposer');
}
示例2: boot
/**
* Bootstrap the application services.
*
* @param \Illuminate\Contracts\View\Factory $factory
* @return void
*/
public function boot(Factory $factory)
{
$factory->composer(['_partials.nav', 'dialogs.command', 'user.profile'], ActiveUserComposer::class);
$factory->composer('_partials.nav', HeaderComposer::class);
$factory->composer('_partials.sidebar', NavigationComposer::class);
$factory->composer(['layout', 'user.profile'], ThemeComposer::class);
$factory->composer('_partials.update', VersionComposer::class);
}
示例3: boot
public function boot(Factory $view)
{
$this->loadViewsFrom(__DIR__ . '/Views', 'toolbox');
$this->publishes([__DIR__ . '/Views' => base_path('resources/views/vendor/toolbox')]);
// We need to register our view composer for errorPartial to properly set all variables
$view->composer('vendor.toolbox.errors.errorPartial', ErrorPartialComposer::class);
}
示例4: boot
public function boot(ViewFactory $view)
{
/*view()->composer('partials._navbar', function($view){
$name = (\Auth::user())? \Auth::user()->name : '';
$view->with('name', $name);
});*/
//USED TO SEND THE "NAME" OF THE LOGGED IN USER TO THE "_navbar" VIEW
$view->composer(['partials._navbar', 'tickets.viewAll'], 'App\\Http\\ViewComposers\\NavigationComposer');
//USED TO CREATE THE "BUSINESS UNIT" SELECT LIST
$view->composer(['partials._registrationFormFields', 'partials._homepg_applicationForm'], 'App\\Http\\ViewComposers\\BusinessUnitComposer');
//USED TO CREATE THE "APPLICATION" SELECT LIST
$view->composer('tickets.create', 'App\\Http\\ViewComposers\\ApplicationComposer');
//USED TO SEND FILTERED TICKETS TO THE "viewAll" VIEW -- NOT WORKING
/*$view->composer(
'tickets.viewAll', 'App\Http\ViewComposers\ViewTicketsComposer'
);*/
}
示例5: boot
public function boot(Routing $routing, Dispatcher $events, Factory $view)
{
$this->loadViews();
$this->publishMigrations();
$routing->addRoutes();
$events->listen(BuildingMenu::class, function (BuildingMenu $event) {
$event->menu->add(['text' => 'Nieuws', 'url' => 'admin/news']);
});
$view->composer('news::partials.preview_latest', Latest::class);
$this->provideMenuPage();
}
示例6: boot
/**
* {@inheritDoc}
*/
public function boot(ViewFactory $viewFactory, CacheRepository $cache)
{
// Define views path
$this->loadViewsFrom(__DIR__ . '/../resources/views', 'queue-monitor');
// Composer for the status views
$composer = function ($view) use($cache) {
$queues = [];
foreach ($cache->get(QueueMonitor::QUEUES_CACHE_KEY, []) as $queueName) {
$status = QueueStatus::get($queueName);
if (!$status) {
$status = new QueueStatus($queueName, QueueStatus::ERROR, false);
$status->setMessage("Status not found in cache; is a cron job set up and running?");
}
$queues[$queueName] = $status;
}
$view->withQueues($queues);
};
$viewFactory->composer('queue-monitor::status', $composer);
$viewFactory->composer('queue-monitor::status-json', $composer);
}
示例7: boot
/**
* Boot the service provider.
*
* @param \Illuminate\Contracts\View\Factory $factory
*/
public function boot(Factory $factory)
{
$factory->composer('*', AppComposer::class);
$factory->composer('*', CurrentUserComposer::class);
$factory->composer(['index', 'issue', 'subscribe', 'signup'], ExploreComposer::class);
$factory->composer(['index', 'issue', 'subscribe', 'signup', 'admin.settings.theme'], ThemeComposer::class);
$factory->composer('dashboard.*', DashboardComposer::class);
$factory->composer('admin.*', AdminComposer::class);
$factory->composer(['install', 'admin.settings.localization', 'admin.settings.timezone'], TimezoneLocaleComposer::class);
}
示例8: boot
/**
* Boot the service provider.
*
* @param \Illuminate\Contracts\View\Factory $factory
*/
public function boot(Factory $factory)
{
$factory->composer('*', AppComposer::class);
$factory->composer('*', CurrentUserComposer::class);
$factory->composer(['index'], MetricsComposer::class);
$factory->composer(['index', 'incident', 'subscribe'], StatusPageComposer::class);
$factory->composer(['index', 'incident', 'subscribe', 'dashboard.settings.theme'], ThemeComposer::class);
$factory->composer('dashboard.*', DashboardComposer::class);
$factory->composer(['setup', 'dashboard.settings.localization'], TimezoneLocaleComposer::class);
}
示例9: boot
/**
* Boot the service provider.
*
* @param \Illuminate\Contracts\View\Factory $factory
*/
public function boot(Factory $factory)
{
$factory->composer('*', AppComposer::class);
$factory->composer('*', LoggedUserComposer::class);
$factory->composer(['index', 'subscribe'], IndexComposer::class);
$factory->composer(['index', 'subscribe'], ThemeComposer::class);
$factory->composer('dashboard.*', DashboardComposer::class);
$factory->composer(['setup', 'dashboard.settings.app-setup'], TimezoneLocaleComposer::class);
}
示例10: boot
/**
* Register bindings in the container.
*
* @param ViewFactory $view
*/
public function boot(ViewFactory $view)
{
$view->composer('*', 'vAMSYS\\Http\\ViewComposers\\GlobalComposer');
$view->composer('flights.home', 'vAMSYS\\Http\\ViewComposers\\FlightsComposer');
$view->composer('flights.book', 'vAMSYS\\Http\\ViewComposers\\FlightsBookComposer');
$view->composer('flights.jumpseat', 'vAMSYS\\Http\\ViewComposers\\FlightsBookComposer');
$view->composer('staff.*', 'vAMSYS\\Http\\ViewComposers\\StaffComposer');
$view->composer('profile.*', 'vAMSYS\\Http\\ViewComposers\\ProfileComposer');
}
示例11: boot
public function boot(Factory $view)
{
$view->composer(['api-tester::api-tester'], ApiTesterComposer::class);
}
示例12: boot
/**
* Register bindings in the container.
*
* @return void
*/
public function boot(ViewFactory $view)
{
$view->composer('profile::update', 'App\\View\\Composers\\SelectComposer');
$view->composer('ads.create', 'App\\View\\Composers\\SelectComposer');
$view->composer('admin.advertisement._form', 'App\\View\\Composers\\SelectComposer');
}
示例13: boot
/**
* Register bindings in the container.
*
* @return void
*/
public function boot(ViewFactory $view)
{
$view->composer('*', 'App\\Http\\ViewComposers\\LayoutComposer');
}
示例14: boot
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(ViewFactory $view)
{
//Share notifacations across all views
$view->composer('master-back', 'App\\Http\\ViewComposers\\ApplicationComposer');
}
示例15: boot
public function boot(Factory $factory)
{
$factory->composer('*', CurrentUserComposer::class);
}