AppServiceProvider.php 583 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace App\Providers;
  3. use Illuminate\Support\ServiceProvider;
  4. use Illuminate\Support\Facades\Auth;
  5. class AppServiceProvider extends ServiceProvider
  6. {
  7. /**
  8. * Bootstrap any application services.
  9. *
  10. * @return void
  11. */
  12. public function boot()
  13. {
  14. //$user_id = \Auth::user()->id;
  15. view()->share('share_noti', [3]);
  16. view()->composer('*', 'App\Http\ViewComposers\GlobalComposer');
  17. }
  18. /**
  19. * Register any application services.
  20. *
  21. * @return void
  22. */
  23. public function register()
  24. {
  25. //
  26. }
  27. }