| @@ 139-148 (lines=10) @@ | ||
| 136 | /** |
|
| 137 | * @SuppressWarnings(PHPMD.ShortVariable) |
|
| 138 | */ |
|
| 139 | public function find($id, $columns = ['*']) |
|
| 140 | { |
|
| 141 | $tags = $this->getCacheTags(); |
|
| 142 | $key = $this->getCacheKey($columns, $id); |
|
| 143 | ||
| 144 | return $this->cache($tags) |
|
| 145 | ->rememberForever($key, function () use ($id, $columns) { |
|
| 146 | return parent::find($id, $columns); |
|
| 147 | }); |
|
| 148 | } |
|
| 149 | ||
| 150 | public function first($columns = ['*']) |
|
| 151 | { |
|
| @@ 150-159 (lines=10) @@ | ||
| 147 | }); |
|
| 148 | } |
|
| 149 | ||
| 150 | public function first($columns = ['*']) |
|
| 151 | { |
|
| 152 | $tags = $this->getCacheTags(); |
|
| 153 | $key = $this->getCacheKey($columns) . '-first'; |
|
| 154 | ||
| 155 | return $this->cache($tags) |
|
| 156 | ->rememberForever($key, function () use ($columns) { |
|
| 157 | return parent::first($columns); |
|
| 158 | }); |
|
| 159 | } |
|
| 160 | ||
| 161 | public function get($columns = ['*']) |
|
| 162 | { |
|
| @@ 161-170 (lines=10) @@ | ||
| 158 | }); |
|
| 159 | } |
|
| 160 | ||
| 161 | public function get($columns = ['*']) |
|
| 162 | { |
|
| 163 | $tags = $this->getCacheTags(); |
|
| 164 | $key = $this->getCacheKey($columns); |
|
| 165 | ||
| 166 | return $this->cache($tags) |
|
| 167 | ->rememberForever($key, function () use ($columns) { |
|
| 168 | return parent::get($columns); |
|
| 169 | }); |
|
| 170 | } |
|
| 171 | ||
| 172 | public function max($column) |
|
| 173 | { |
|