Skip to content

Commit

Permalink
destroy method added
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrick Peter committed Aug 23, 2023
1 parent e4849bb commit 9ab8ea4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Schema/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,19 @@ public function delete($id = null)
return $delete->rowCount();
}

/**
* Destroy/Delete records from the database.
*
* @param mixed $id
* [default column name is 'id']
*
* @return int
*/
public function destroy(string $id = null)
{
return $this->where('id', $id)->delete();
}

/**
* Increment a column's value by a given amount.
*
Expand Down

0 comments on commit 9ab8ea4

Please sign in to comment.