I am a novice in web developing with Laravel 5. I installed asGgardCMS and After seeing asgardCms codes, I found that there is nothing codes in app/Http/route.php file and r
laravel ^6
explained in comments
mapApiRoutes();
$this->mapWebRoutes();
// map new custom routes
$this->mapCustomRoutes();
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
/**
* Define the "custom" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapCustomRoutes()
{
Route::middleware('web')
->namespace($this->custom_namespace) //or change its custom_namespace to namespace if you don't need change diractory of your controllers
->group(base_path('routes/custom.php')); // change custom.php to your custom routers file name
}
}