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