group(function () { Route::get('searches/form/{element}', 'SearchesAPIController@form'); Route::resource('searches', 'SearchesAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for searches Route::prefix('{guard}/search')->group(function () { Route::get('searches/form/{element}', 'SearchesAPIController@form'); Route::apiResource('searches', 'SearchesAPIController'); }); // Public routes for searches Route::get('search/Searches', 'SearchesPublicController@getSearches'); } ); }