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 {
8585 public function delete($id) {
8686 // return $this->repository->findOrFail($id)->delete();
8787 }
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+ }
8898}
Original file line number Diff line number Diff line change @@ -57,33 +57,12 @@ public function update(array $attributes = []);
5757 public function delete ($ id );
5858
5959 /**
60- * Get the value of the model's route key .
60+ * Destroy the models for the given IDs .
6161 *
62- * @return mixed
62+ * @param \Illuminate\Support\Collection|array|int $ids
63+ * @return int
6364 */
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 );
8766
8867 /**
8968 * Convert the model to its string representation.
Original file line number Diff line number Diff line change 22
33namespace PPSpaces \Repositories ;
44
5+ use JsonSerializable ;
6+ use Illuminate \Support \Traits \ForwardsCalls ;
7+ use Illuminate \Contracts \Routing \UrlRoutable ;
58use PPSpaces \Contracts \Model as RepositoryContract ;
69
7- abstract class Model implements RepositoryContract {
10+ abstract class Model implements RepositoryContract, JsonSerializable, UrlRoutable {
11+
12+ use ForwardsCalls;
813
914 /**
1015 * The repository instance.
@@ -85,6 +90,16 @@ public function delete($id) {
8590 return $ this ->repository ->findOrFail ($ id )->delete ();
8691 }
8792
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+
88103 /**
89104 * Get the value of the model's route key.
90105 *
You can’t perform that action at this time.
0 commit comments