| @@ 165-174 (lines=10) @@ | ||
| 162 | /** |
|
| 163 | * @SuppressWarnings(PHPMD.ShortVariable) |
|
| 164 | */ |
|
| 165 | public function find($id, $columns = ['*']) |
|
| 166 | { |
|
| 167 | $tags = $this->getCacheTags(); |
|
| 168 | $key = $this->getCacheKey($columns, $id); |
|
| 169 | ||
| 170 | return $this->cache($tags) |
|
| 171 | ->rememberForever($key, function () use ($id, $columns) { |
|
| 172 | return parent::find($id, $columns); |
|
| 173 | }); |
|
| 174 | } |
|
| 175 | ||
| 176 | public function first($columns = ['*']) |
|
| 177 | { |
|
| @@ 176-185 (lines=10) @@ | ||
| 173 | }); |
|
| 174 | } |
|
| 175 | ||
| 176 | public function first($columns = ['*']) |
|
| 177 | { |
|
| 178 | $tags = $this->getCacheTags(); |
|
| 179 | $key = $this->getCacheKey($columns) . '-first'; |
|
| 180 | ||
| 181 | return $this->cache($tags) |
|
| 182 | ->rememberForever($key, function () use ($columns) { |
|
| 183 | return parent::first($columns); |
|
| 184 | }); |
|
| 185 | } |
|
| 186 | ||
| 187 | public function get($columns = ['*']) |
|
| 188 | { |
|
| @@ 187-196 (lines=10) @@ | ||
| 184 | }); |
|
| 185 | } |
|
| 186 | ||
| 187 | public function get($columns = ['*']) |
|
| 188 | { |
|
| 189 | $tags = $this->getCacheTags(); |
|
| 190 | $key = $this->getCacheKey($columns); |
|
| 191 | ||
| 192 | return $this->cache($tags) |
|
| 193 | ->rememberForever($key, function () use ($columns) { |
|
| 194 | return parent::get($columns); |
|
| 195 | }); |
|
| 196 | } |
|
| 197 | ||
| 198 | public function max($column) |
|
| 199 | { |
|