RouteServiceProvider.php 1.0 KB

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