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