Skip to content

Commit

Permalink
Merge pull request #1709 from jim-parry/fix/rc
Browse files Browse the repository at this point in the history
Fix/rc
  • Loading branch information
jim-parry authored Feb 7, 2019
2 parents 36fbb8e + 380b972 commit 4d32aab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions system/Router/RouteCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4d32aab

Please sign in to comment.