RouteServiceProvider.php 826 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace App\Providers;
  3. use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
  4. use Illuminate\Support\Facades\Route;
  5. class RouteServiceProvider extends ServiceProvider
  6. {
  7. /**
  8. * The path to your application's "home" route.
  9. *
  10. * Typically, users are redirected here after authentication.
  11. *
  12. * @var string
  13. */
  14. public const HOME = '/home';
  15. /**
  16. * Define your route model bindings, pattern filters, and other route configuration.
  17. */
  18. public function boot(): void
  19. {
  20. $this->routes(function () {
  21. Route::middleware('api')
  22. ->prefix('api')
  23. ->group(base_path('routes/api.php'));
  24. Route::middleware('web')
  25. ->group(base_path('routes/web.php'));
  26. });
  27. }
  28. }