group(function () { Route::resource('waterway', 'WaterwayResourceController'); }); // 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 pages Route::prefix('{guard}/page')->group(function () { Route::apiResource('page', 'WaterwayResourceController'); }); // Public routes for pages Route::get('waterways/', 'WaterwayPublicController@index'); Route::get('waterways/{slug?}', 'WaterwayPublicController@show'); } ); }