Skip to content

Commit f500eb2

Browse files
committed
Add destroy mothod to Base Repository Model
1 parent 58f0119 commit f500eb2

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/Repositories/Model.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22

33
namespace PPSpaces\Repositories;
44

5+
use JsonSerializable;
6+
use Illuminate\Support\Traits\ForwardsCalls;
57
use Illuminate\Contracts\Routing\UrlRoutable;
68
use PPSpaces\Contracts\Model as RepositoryContract;
79

8-
abstract class Model implements RepositoryContract, UrlRoutable {
10+
abstract class Model implements RepositoryContract, JsonSerializable, UrlRoutable {
11+
12+
use ForwardsCalls;
913

1014
/**
1115
* The repository instance.
@@ -86,6 +90,16 @@ public function delete($id) {
8690
return $this->repository->findOrFail($id)->delete();
8791
}
8892

93+
/**
94+
* Destroy the models for the given IDs.
95+
*
96+
* @param \Illuminate\Support\Collection|array|int $ids
97+
* @return int
98+
*/
99+
public static function destroy($ids) {
100+
//
101+
}
102+
89103
/**
90104
* Get the value of the model's route key.
91105
*

0 commit comments

Comments
 (0)