ThemeServiceProvider.php 671 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace App\Providers;
  3. use Illuminate\Contracts\View\Factory as View;
  4. use Illuminate\Support\ServiceProvider;
  5. class ThemeServiceProvider extends ServiceProvider
  6. {
  7. /**
  8. * Bootstrap the application services.
  9. *
  10. * @return void
  11. */
  12. public function boot(View $view)
  13. {
  14. $theme = config('tipask.theme','default');
  15. $view->addNameSpace('theme', [
  16. base_path()."/resources/views/themes/$theme",
  17. base_path().'/resources/views/themes/default',
  18. ]);
  19. }
  20. /**
  21. * Register the application services.
  22. *
  23. * @return void
  24. */
  25. public function register()
  26. {
  27. //
  28. }
  29. }