group(function () { Route::get('niche/form/{element}', 'NicheAPIController@form'); Route::resource('niche', 'NicheAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for niches Route::prefix('{guard}/niche')->group(function () { Route::get('niche/form/{element}', 'NicheAPIController@form'); Route::apiResource('niche', 'NicheAPIController'); }); // Public routes for niches Route::get('niche/Niche', 'NichePublicController@getNiche'); } ); }