mapWebRoutes(); $this->mapApiRoutes(); } /** * Register web routes from the real module path. */ protected function mapWebRoutes(): void { $path = dirname(__DIR__) . '/Routes/web.php'; if (is_file($path)) { Route::middleware(['web', 'auth'])->group($path); } } /** * Register API routes from the real module path. */ protected function mapApiRoutes(): void { $path = dirname(__DIR__) . '/Routes/api.php'; if (is_file($path)) { Route::middleware(['api'])->prefix('api/v1')->group($path); } } }