RouteServiceProvider.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 your controller routes.
  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()
  22. {
  23. parent::boot();
  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. $this->mapQuickAppRoutes($router);
  34. }
  35. /**
  36. * 快应用
  37. */
  38. protected function mapQuickAppRoutes(Router $router)
  39. {
  40. $router->group([
  41. 'middleware' => 'web',
  42. ], function ($router) {
  43. require app_path('Http/Routes/QuickApp/QuickAppRoutes.php');
  44. });
  45. }
  46. }