| @@ 82-91 (lines=10) @@ | ||
| 79 | * |
|
| 80 | * @return |
|
| 81 | */ |
|
| 82 | public function allItems() |
|
| 83 | { |
|
| 84 | if (!$this->hasSoftDeleting()) { |
|
| 85 | throw new \Exception('Model does not have Soft Deleting'); |
|
| 86 | } |
|
| 87 | ||
| 88 | $model = $this->model->withTrashed(); |
|
| 89 | ||
| 90 | return $this->query($model); |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * Returns Model Items, either all() or paginated(). |
|
| @@ 101-110 (lines=10) @@ | ||
| 98 | * |
|
| 99 | * @return |
|
| 100 | */ |
|
| 101 | public function onlyTrashedItems() |
|
| 102 | { |
|
| 103 | if (!$this->hasSoftDeleting()) { |
|
| 104 | throw new \Exception('Model does not have Soft Deleting'); |
|
| 105 | } |
|
| 106 | ||
| 107 | $model = $this->model->onlyTrashed(); |
|
| 108 | ||
| 109 | return $this->query($model); |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * Performs the Model Query |
|