@@ 108-117 (lines=10) @@ | ||
105 | * |
|
106 | * @return |
|
107 | */ |
|
108 | public function allItems($count = false) |
|
109 | { |
|
110 | if (!$this->hasSoftDeleting()) { |
|
111 | throw new \Exception('Model does not have Soft Deleting'); |
|
112 | } |
|
113 | ||
114 | $this->query = $this->model->newQuery()->withTrashed(); |
|
115 | ||
116 | return $this->query($count); |
|
117 | } |
|
118 | ||
119 | /** |
|
120 | * Returns Model Items, either all() or paginated(). |
|
@@ 127-136 (lines=10) @@ | ||
124 | * |
|
125 | * @return |
|
126 | */ |
|
127 | public function onlyTrashedItems($count = false) |
|
128 | { |
|
129 | if (!$this->hasSoftDeleting()) { |
|
130 | throw new \Exception('Model does not have Soft Deleting'); |
|
131 | } |
|
132 | ||
133 | $this->query = $this->model->newQuery()->onlyTrashed(); |
|
134 | ||
135 | return $this->query($count); |
|
136 | } |
|
137 | ||
138 | /** |
|
139 | * Performs the Model Query |