RouteServiceProvider.php 774 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php namespace App\Providers;
  2. use App;
  3. use Illuminate\Routing\RouteServiceProvider as ServiceProvider;
  4. class RouteServiceProvider extends ServiceProvider {
  5. /**
  6. * Called before routes are registered.
  7. *
  8. * Register any model bindings or pattern based filters.
  9. *
  10. * @return void
  11. */
  12. public function before()
  13. {
  14. //
  15. }
  16. /**
  17. * Define the routes for the application.
  18. *
  19. * @return void
  20. */
  21. public function map()
  22. {
  23. App::booted(function()
  24. {
  25. // Once the application has booted, we will include the default routes
  26. // file. This "namespace" helper will load the routes file within a
  27. // route group which automatically sets the controller namespace.
  28. $this->namespaced(function()
  29. {
  30. require app_path().'/Http/routes.php';
  31. });
  32. });
  33. }
  34. }