Skip to content

Commit d91cf1a

Browse files
author
Fredrick Peter
committed
Adding destroy method
1 parent 9ab8ea4 commit d91cf1a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Prior to installing `php-orm-database` get the [Composer](https://getcomposer.or
119119
**Step 1** — update your `composer.json`:
120120
```composer.json
121121
"require": {
122-
"peterson/database": "^4.3.2"
122+
"peterson/database": "^4.3.3"
123123
}
124124
```
125125

src/Schema/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,12 +1537,12 @@ public function delete($id = null)
15371537
/**
15381538
* Destroy/Delete records from the database.
15391539
*
1540-
* @param mixed $id
1540+
* @param string|int $id
15411541
* [default column name is 'id']
15421542
*
15431543
* @return int
15441544
*/
1545-
public function destroy(string $id = null)
1545+
public function destroy(string|int $id)
15461546
{
15471547
return $this->where('id', $id)->delete();
15481548
}

0 commit comments

Comments
 (0)