group(function () { Route::resource('committee', 'CommitteeResourceController'); }); // Public routes for committee Route::get('committees/', 'CommitteePublicController@index'); Route::get('committees/{slug?}', 'CommitteePublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'CommitteeResourceController'); }); // Public routes for pages Route::get('committees/', 'CommitteePublicController@index'); Route::get('committees/{slug?}', 'CommitteePublicController@show'); } ); }