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