Skip to main content

Search Results for "view composers"

We found 7 results for "view composers".

Tutorial Free

How to Pass Global Variables to Blade: View Share and Composer

Imagine you want to show some "global" data in the Blade: for example, the number of new users this week on the top navigation. Not sure what Controllers would the data come from? Then you can perform that action in the Service Provider, in three ways.

Code Example Bottelet/DaybydayCRM

Bottelet/DaybydayCRM

Files in the example:

  • app/Http/ViewComposers/ClientHeaderComposer.php
  • app/Providers/ViewComposerServiceProvider.php
  • config/app.php
  • resources/views/clients/show.blade.php
  • resources/views/partials/clientheader.blade.php
Code Example spatie/freek.dev

spatie/freek.dev

Files in the example:

  • app/Http/ViewComposers/LazyViewComposer.php
  • app/Providers/ViewServiceProvider.php
  • resources/views/front/components/lazy.blade.php
Code Example monicahq/monica

monicahq/monica

Files in the example:

  • app/Http/ViewComposers/CurrencySelectViewComposer.php
  • resources/views/partials/components/currency-select.blade.php
Code Example pterodactyl/panel

pterodactyl/panel

Files in the example:

  • app/Providers/ViewComposerServiceProvider.php
  • app/Http/ViewComposers/AssetComposer.php
  • resources/views/templates/wrapper.blade.php
Code Example tighten/onramp

tighten/onramp

Files in the example:

  • app/Providers/ViewServiceProvider.php
  • resources/views/partials/language-switcher.blade.php

Haven't found what you're looking for?

Our team is here to help. Ask us anything about Laravel development and we'll get back to you with personalized guidance.

Ask for Personal Help

We'll respond within 24 hours

Function available only for premium members.

Be as specific as possible so we can provide the best guidance.

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.