RouteServiceProvider.php 1.0 KB

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