group(function () { Route::get('location/form/{element}', 'LocationAPIController@form'); Route::resource('location', 'LocationAPIController'); }); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for flights Route::prefix('{guard}/flight')->group(function () { Route::get('location/form/{element}', 'LocationAPIController@form'); Route::apiResource('location', 'LocationAPIController'); }); // Public routes for flights Route::get('flight/Location', 'LocationPublicController@getLocation'); } ); }