group(function () { Route::get('recomentation/form/{element}', 'RecomentationAPIController@form'); Route::resource('recomentation', 'RecomentationAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for recomentations Route::prefix('{guard}/recomentation')->group(function () { Route::get('recomentation/form/{element}', 'RecomentationAPIController@form'); Route::apiResource('recomentation', 'RecomentationAPIController'); }); // Public routes for recomentations Route::get('recomentation/Recomentation', 'RecomentationPublicController@getRecomentation'); } ); }