group(function () { Route::get('suggestions/form/{element}', 'SuggestionsAPIController@form'); Route::resource('suggestions', 'SuggestionsAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for suggestions Route::prefix('{guard}/suggestion')->group(function () { Route::get('suggestions/form/{element}', 'SuggestionsAPIController@form'); Route::apiResource('suggestions', 'SuggestionsAPIController'); }); // Public routes for suggestions Route::get('suggestion/Suggestions', 'SuggestionsPublicController@getSuggestions'); } ); }