| @@ 191-200 (lines=10) @@ | ||
| 188 | /** |
|
| 189 | * @SuppressWarnings(PHPMD.ShortVariable) |
|
| 190 | */ |
|
| 191 | public function find($id, $columns = ['*']) |
|
| 192 | { |
|
| 193 | $tags = $this->getCacheTags(); |
|
| 194 | $key = $this->getCacheKey($columns, $id); |
|
| 195 | ||
| 196 | return $this->cache($tags) |
|
| 197 | ->rememberForever($key, function () use ($id, $columns) { |
|
| 198 | return parent::find($id, $columns); |
|
| 199 | }); |
|
| 200 | } |
|
| 201 | ||
| 202 | public function first($columns = ['*']) |
|
| 203 | { |
|
| @@ 202-211 (lines=10) @@ | ||
| 199 | }); |
|
| 200 | } |
|
| 201 | ||
| 202 | public function first($columns = ['*']) |
|
| 203 | { |
|
| 204 | $tags = $this->getCacheTags(); |
|
| 205 | $key = $this->getCacheKey($columns) . '-first'; |
|
| 206 | ||
| 207 | return $this->cache($tags) |
|
| 208 | ->rememberForever($key, function () use ($columns) { |
|
| 209 | return parent::first($columns); |
|
| 210 | }); |
|
| 211 | } |
|
| 212 | ||
| 213 | public function get($columns = ['*']) |
|
| 214 | { |
|
| @@ 213-222 (lines=10) @@ | ||
| 210 | }); |
|
| 211 | } |
|
| 212 | ||
| 213 | public function get($columns = ['*']) |
|
| 214 | { |
|
| 215 | $tags = $this->getCacheTags(); |
|
| 216 | $key = $this->getCacheKey($columns); |
|
| 217 | ||
| 218 | return $this->cache($tags) |
|
| 219 | ->rememberForever($key, function () use ($columns) { |
|
| 220 | return parent::get($columns); |
|
| 221 | }); |
|
| 222 | } |
|
| 223 | ||
| 224 | public function max($column) |
|
| 225 | { |
|