fix eloquent->delete bug.

This commit is contained in:
Taylor Otwell
2012-03-30 08:41:52 -05:00
parent b870ac09dd
commit 75f6384767
2 changed files with 14 additions and 3 deletions

View File

@@ -125,9 +125,7 @@ class Has_Many_And_Belongs_To extends Relationship {
*/
public function delete()
{
$id = $this->base->get_key();
return $this->joining_table()->where($this->foreign_key(), '=', $id)->delete();
return $this->pivot()->delete();
}
/**