Skip to content

Commit

Permalink
Adding destroy method
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrick Peter committed Sep 1, 2023
1 parent 9ab8ea4 commit d91cf1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Prior to installing `php-orm-database` get the [Composer](https://getcomposer.or
**Step 1** — update your `composer.json`:
```composer.json
"require": {
"peterson/database": "^4.3.2"
"peterson/database": "^4.3.3"
}
```

Expand Down
4 changes: 2 additions & 2 deletions src/Schema/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1537,12 +1537,12 @@ public function delete($id = null)
/**
* Destroy/Delete records from the database.
*
* @param mixed $id
* @param string|int $id
* [default column name is 'id']
*
* @return int
*/
public function destroy(string $id = null)
public function destroy(string|int $id)
{
return $this->where('id', $id)->delete();
}
Expand Down

0 comments on commit d91cf1a

Please sign in to comment.