<?php

namespace App\Providers;

use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;

class RouteServiceProvider extends ServiceProvider
{
    
    public const HOME = '/home';

    
    public function boot(): void
    {
        $this->routes(function () {
            Route::middleware('web')
                ->group(base_path('routes/web.php'));

            Route::middleware(['web', 'auth', 'is_admin'])
                ->group(base_path('routes/admin.php'));

            Route::middleware(['web', 'auth', 'is_user'])
                ->group(base_path('routes/user.php'));

            Route::prefix('api')
                ->middleware('api')
                ->group(base_path('routes/api.php'));

            Route::middleware('web')
            ->group(base_path('routes/guest.php'));

        });
    }
}

