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