Skip to content

Commit 9ab8ea4

Browse files
author
Fredrick Peter
committed
destroy method added
1 parent e4849bb commit 9ab8ea4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Schema/Builder.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,6 +1534,19 @@ public function delete($id = null)
15341534
return $delete->rowCount();
15351535
}
15361536

1537+
/**
1538+
* Destroy/Delete records from the database.
1539+
*
1540+
* @param mixed $id
1541+
* [default column name is 'id']
1542+
*
1543+
* @return int
1544+
*/
1545+
public function destroy(string $id = null)
1546+
{
1547+
return $this->where('id', $id)->delete();
1548+
}
1549+
15371550
/**
15381551
* Increment a column's value by a given amount.
15391552
*

0 commit comments

Comments
 (0)