group(function () { Route::resource('master', 'MasterResourceController'); }); // Public routes for master Route::get('masters/', 'MasterPublicController@index'); Route::get('master/{slug?}', 'MasterPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for master Route::prefix('{guard}/master')->group(function () { Route::resource('master', 'MasterResourceController'); }); // Public routes for master Route::get('masters/', 'MasterPublicController@index'); Route::get('master/{slug?}', 'MasterPublicController@show'); } ); }