laravel 8 route and old way code example
Example: laravel 8 routes namespace
Route::group(['namespace' => 'App\Http\Controllers', 'prefix' => 'admin',
'as' => 'admin.', 'middleware' => ['auth:sanctum', 'verified']], function()
{
Route::get('/dashboard', ['DashboardController', 'index']);
});