| @@ 153-162 (lines=10) @@ | ||
| 150 | /** |
|
| 151 | * @SuppressWarnings(PHPMD.ShortVariable) |
|
| 152 | */ |
|
| 153 | public function find($id, $columns = ['*']) |
|
| 154 | { |
|
| 155 | $tags = $this->getCacheTags(); |
|
| 156 | $key = $this->getCacheKey($columns, $id); |
|
| 157 | ||
| 158 | return $this->cache($tags) |
|
| 159 | ->rememberForever($key, function () use ($id, $columns) { |
|
| 160 | return parent::find($id, $columns); |
|
| 161 | }); |
|
| 162 | } |
|
| 163 | ||
| 164 | public function first($columns = ['*']) |
|
| 165 | { |
|
| @@ 164-173 (lines=10) @@ | ||
| 161 | }); |
|
| 162 | } |
|
| 163 | ||
| 164 | public function first($columns = ['*']) |
|
| 165 | { |
|
| 166 | $tags = $this->getCacheTags(); |
|
| 167 | $key = $this->getCacheKey($columns) . '-first'; |
|
| 168 | ||
| 169 | return $this->cache($tags) |
|
| 170 | ->rememberForever($key, function () use ($columns) { |
|
| 171 | return parent::first($columns); |
|
| 172 | }); |
|
| 173 | } |
|
| 174 | ||
| 175 | public function get($columns = ['*']) |
|
| 176 | { |
|
| @@ 175-184 (lines=10) @@ | ||
| 172 | }); |
|
| 173 | } |
|
| 174 | ||
| 175 | public function get($columns = ['*']) |
|
| 176 | { |
|
| 177 | $tags = $this->getCacheTags(); |
|
| 178 | $key = $this->getCacheKey($columns); |
|
| 179 | ||
| 180 | return $this->cache($tags) |
|
| 181 | ->rememberForever($key, function () use ($columns) { |
|
| 182 | return parent::get($columns); |
|
| 183 | }); |
|
| 184 | } |
|
| 185 | ||
| 186 | public function max($column) |
|
| 187 | { |
|