diff --git a/system/Router/RouteCollection.php b/system/Router/RouteCollection.php index 2d3f8ff9ba76..4083ca39b156 100644 --- a/system/Router/RouteCollection.php +++ b/system/Router/RouteCollection.php @@ -863,17 +863,17 @@ public function resource(string $name, array $options = null): RouteCollectionIn $this->delete($name . '/' . $id, $new_name . '::delete/$1', $options); } - // Web Safe? + // Web Safe? delete needs checking before update because of method name if (isset($options['websafe'])) { - if (in_array('update', $methods)) - { - $this->post($name . '/' . $id, $new_name . '::update/$1', $options); - } if (in_array('delete', $methods)) { $this->post($name . '/' . $id . '/delete', $new_name . '::delete/$1', $options); } + if (in_array('update', $methods)) + { + $this->post($name . '/' . $id, $new_name . '::update/$1', $options); + } } return $this;