暫無描述

RouteServiceProvider.php 931B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php namespace App\Providers;
  2. use Illuminate\Routing\Router;
  3. use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
  4. class RouteServiceProvider extends ServiceProvider {
  5. /**
  6. * This namespace is applied to the controller routes in your routes file.
  7. *
  8. * In addition, it is set as the URL generator's root namespace.
  9. *
  10. * @var string
  11. */
  12. protected $namespace = 'App\Http\Controllers';
  13. /**
  14. * Define your route model bindings, pattern filters, etc.
  15. *
  16. * @param \Illuminate\Routing\Router $router
  17. * @return void
  18. */
  19. public function boot(Router $router)
  20. {
  21. parent::boot($router);
  22. //
  23. }
  24. /**
  25. * Define the routes for the application.
  26. *
  27. * @param \Illuminate\Routing\Router $router
  28. * @return void
  29. */
  30. public function map(Router $router)
  31. {
  32. $router->group(['namespace' => $this->namespace], function($router)
  33. {
  34. require app_path('Http/routes.php');
  35. });
  36. }
  37. }