File tree Expand file tree Collapse file tree 3 files changed +30
-26
lines changed Expand file tree Collapse file tree 3 files changed +30
-26
lines changed Original file line number Diff line number Diff line change @@ -85,4 +85,14 @@ class DummyClass extends Repository {
85
85
public function delete($id) {
86
86
// return $this->repository->findOrFail($id)->delete();
87
87
}
88
+
89
+ /**
90
+ * Destroy the models for the given IDs.
91
+ *
92
+ * @param \Illuminate\Support\Collection|array|int $ids
93
+ * @return int
94
+ */
95
+ public static function destroy($ids) {
96
+ //
97
+ }
88
98
}
Original file line number Diff line number Diff line change @@ -57,33 +57,12 @@ public function update(array $attributes = []);
57
57
public function delete ($ id );
58
58
59
59
/**
60
- * Get the value of the model's route key .
60
+ * Destroy the models for the given IDs .
61
61
*
62
- * @return mixed
62
+ * @param \Illuminate\Support\Collection|array|int $ids
63
+ * @return int
63
64
*/
64
- public function getRouteKey ();
65
-
66
- /**
67
- * Get the route key for the model.
68
- *
69
- * @return string
70
- */
71
- public function getRouteKeyName ();
72
-
73
- /**
74
- * Retrieve the model for a bound value.
75
- *
76
- * @param mixed $value
77
- * @return \Illuminate\Database\Eloquent\Model|null
78
- */
79
- public function resolveRouteBinding ($ value );
80
-
81
- /**
82
- * Convert the object into something JSON serializable.
83
- *
84
- * @return array
85
- */
86
- public function jsonSerialize ();
65
+ public static function destroy ($ ids );
87
66
88
67
/**
89
68
* Convert the model to its string representation.
Original file line number Diff line number Diff line change 2
2
3
3
namespace PPSpaces \Repositories ;
4
4
5
+ use JsonSerializable ;
6
+ use Illuminate \Support \Traits \ForwardsCalls ;
7
+ use Illuminate \Contracts \Routing \UrlRoutable ;
5
8
use PPSpaces \Contracts \Model as RepositoryContract ;
6
9
7
- abstract class Model implements RepositoryContract {
10
+ abstract class Model implements RepositoryContract, JsonSerializable, UrlRoutable {
11
+
12
+ use ForwardsCalls;
8
13
9
14
/**
10
15
* The repository instance.
@@ -85,6 +90,16 @@ public function delete($id) {
85
90
return $ this ->repository ->findOrFail ($ id )->delete ();
86
91
}
87
92
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
+
88
103
/**
89
104
* Get the value of the model's route key.
90
105
*
You can’t perform that action at this time.
0 commit comments