trans_setlocale().'/admin/word', 'middleware' => ['web', 'auth.role:admin']], function () { Route::resource('words', 'Thang.luu\Word\Http\Controllers\WordsAdminController'); }); // User routes for words Route::group(['prefix' => trans_setlocale().'/user/word', 'middleware' => ['web', 'auth.role:user']], function () { Route::resource('words', 'Thang.luu\Word\Http\Controllers\WordsUserController'); }); // Public routes for words Route::group(['prefix' => trans_setlocale(), 'middleware' => ['web']], function () { Route::get('word/words', 'Thang.luu\Word\Http\Controllers\WordsPublicController@index'); Route::get('word/words/{slug?}', 'Thang.luu\Word\Http\Controllers\WordsPublicController@show'); });