trans_setlocale().'/admin/', 'middleware' => ['web', 'auth.role:admin']], function () { Route::resource('www', 'S\\Http\Controllers\WwwAdminController'); }); // User routes for www Route::group(['prefix' => trans_setlocale().'/user/', 'middleware' => ['web', 'auth.role:user']], function () { Route::resource('www', 'S\\Http\Controllers\WwwUserController'); }); // Public routes for www Route::group(['prefix' => trans_setlocale(), 'middleware' => ['web']], function () { Route::get('/www', 'S\\Http\Controllers\WwwPublicController@index'); Route::get('/www/{slug?}', 'S\\Http\Controllers\WwwPublicController@show'); });