| @@ 105-114 (lines=10) @@ | ||
| 102 | /** |
|
| 103 | * @SuppressWarnings(PHPMD.ShortVariable) |
|
| 104 | */ |
|
| 105 | public function find($id, $columns = ['*']) |
|
| 106 | { |
|
| 107 | $tags = $this->getCacheTags(); |
|
| 108 | $key = $this->getCacheKey($columns, $id); |
|
| 109 | ||
| 110 | return $this->cache($tags) |
|
| 111 | ->rememberForever($key, function () use ($id, $columns) { |
|
| 112 | return parent::find($id, $columns); |
|
| 113 | }); |
|
| 114 | } |
|
| 115 | ||
| 116 | public function first($columns = ['*']) |
|
| 117 | { |
|
| @@ 116-125 (lines=10) @@ | ||
| 113 | }); |
|
| 114 | } |
|
| 115 | ||
| 116 | public function first($columns = ['*']) |
|
| 117 | { |
|
| 118 | $tags = $this->getCacheTags(); |
|
| 119 | $key = $this->getCacheKey($columns) . '-first'; |
|
| 120 | ||
| 121 | return $this->cache($tags) |
|
| 122 | ->rememberForever($key, function () use ($columns) { |
|
| 123 | return parent::first($columns); |
|
| 124 | }); |
|
| 125 | } |
|
| 126 | ||
| 127 | public function get($columns = ['*']) |
|
| 128 | { |
|
| @@ 127-136 (lines=10) @@ | ||
| 124 | }); |
|
| 125 | } |
|
| 126 | ||
| 127 | public function get($columns = ['*']) |
|
| 128 | { |
|
| 129 | $tags = $this->getCacheTags(); |
|
| 130 | $key = $this->getCacheKey($columns); |
|
| 131 | ||
| 132 | return $this->cache($tags) |
|
| 133 | ->rememberForever($key, function () use ($columns) { |
|
| 134 | return parent::get($columns); |
|
| 135 | }); |
|
| 136 | } |
|
| 137 | ||
| 138 | public function max($column) |
|
| 139 | { |
|