ComposerServiceProvider.php 728 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Providers;
  3. use Illuminate\Support\Facades\View;
  4. use Illuminate\Support\ServiceProvider;
  5. class ComposerServiceProvider extends ServiceProvider
  6. {
  7. /**
  8. * Register services.
  9. *
  10. * @return void
  11. */
  12. public function register()
  13. {
  14. //
  15. }
  16. /**
  17. * Bootstrap services.
  18. *
  19. * @return void
  20. */
  21. public function boot()
  22. {
  23. View::composer('application.layouts.header','App\Http\ViewComposers\ApplicationNotificationComposer');
  24. View::composer('supervisor.layout.header','App\Http\ViewComposers\SupervisorNotificationComposer');
  25. View::composer('admin.layouts.header','App\Http\ViewComposers\AdminNotificationComposer');
  26. }
  27. }