@@ 194-201 (lines=8) @@ | ||
191 | * @param array $columns |
|
192 | * @return mixed |
|
193 | */ |
|
194 | public function first($columns = ['*']) |
|
195 | { |
|
196 | if (is_null($this->columns)) { |
|
197 | $this->columns = $columns; |
|
198 | } |
|
199 | ||
200 | return $this->prepareQuery()->first(); |
|
201 | } |
|
202 | ||
203 | /** |
|
204 | * Get a single column's value from the first result of a query. |
|
@@ 222-229 (lines=8) @@ | ||
219 | * @param array $columns |
|
220 | * @return \Illuminate\Support\Collection |
|
221 | */ |
|
222 | public function get($columns = ['*']) |
|
223 | { |
|
224 | if (is_null($this->columns)) { |
|
225 | $this->columns = $columns; |
|
226 | } |
|
227 | ||
228 | return $this->prepareQuery()->get(); |
|
229 | } |
|
230 | ||
231 | /** |
|
232 | * Paginate the given query into a simple paginator. |