group(function () { Route::get('waterway/form/{element}', 'WaterwayAPIController@form'); Route::resource('waterway', 'WaterwayAPIController'); }); // Public routes for waterway Route::get('waterways/', 'WaterwayPublicController@index'); Route::get('waterways/{slug?}', 'WaterwayPublicController@show'); if (Trans::isMultilingual()) { Route::group( [ 'prefix' => '{trans}', 'where' => ['trans' => Trans::keys('|')], ], function () { // Guard routes for waterways Route::prefix('{guard}/waterway')->group(function () { Route::get('waterway/form/{element}', 'WaterwayAPIController@form'); Route::apiResource('waterway', 'WaterwayAPIController'); }); // Public routes for waterways Route::get('waterway/Waterway', 'WaterwayPublicController@getWaterway'); } ); }