Skip to content

Commit

Permalink
Use getKeyId to get the id from key.
Browse files Browse the repository at this point in the history
Signed-off-by: crynobone <crynobone@gmail.com>
  • Loading branch information
crynobone committed Mar 10, 2016
1 parent 493e30b commit 81eca1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Handlers/Eloquent.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function save($key, $value, $isNew = false)
*/
protected function delete($key)
{
$this->resolver()->where('name', '=', $key)->delete();
$this->resolver()->where('id', '=', $this->getKeyId($key))->delete();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Handlers/Fluent.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function save($key, $value, $isNew = false)
*/
protected function delete($key)
{
$this->resolver()->where('id', '=', $id)->delete();
$this->resolver()->where('id', '=', $this->getKeyId($key))->delete();
}

/**
Expand Down

0 comments on commit 81eca1b

Please sign in to comment.