AppServiceProvider.php 728 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace App\Providers;
  3. use Illuminate\Support\Facades\URL;
  4. use Illuminate\Support\ServiceProvider;
  5. class AppServiceProvider extends ServiceProvider
  6. {
  7. protected $widgets = [
  8. \App\Admin\Widgets\LogoutNav::class,
  9. ];
  10. /**
  11. * Register any application services.
  12. *
  13. * @return void
  14. */
  15. public function register()
  16. {
  17. //
  18. }
  19. /**
  20. * Bootstrap any application services.
  21. *
  22. * @return void
  23. */
  24. public function boot()
  25. {
  26. $widgetsRegistry = $this->app[\SleepingOwl\Admin\Contracts\Widgets\WidgetsRegistryInterface::class];
  27. foreach ($this->widgets as $widget) {
  28. $widgetsRegistry->registerWidget($widget);
  29. }
  30. }
  31. }