| @@ 22-28 (lines=7) @@ | ||
| 19 | }); |
|
| 20 | } |
|
| 21 | ||
| 22 | public function count($columns = ['*']) |
|
| 23 | { |
|
| 24 | return $this->cache($this->makeCacheTags()) |
|
| 25 | ->rememberForever($this->makeCacheKey() . "-count", function () use ($columns) { |
|
| 26 | return parent::count($columns); |
|
| 27 | }); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function cursor() |
|
| 31 | { |
|
| @@ 41-47 (lines=7) @@ | ||
| 38 | /** |
|
| 39 | * @SuppressWarnings(PHPMD.ShortVariable) |
|
| 40 | */ |
|
| 41 | public function find($id, $columns = ['*']) |
|
| 42 | { |
|
| 43 | return $this->cache($this->makeCacheTags()) |
|
| 44 | ->rememberForever($this->makeCacheKey($columns, $id), function () use ($id, $columns) { |
|
| 45 | return parent::find($id, $columns); |
|
| 46 | }); |
|
| 47 | } |
|
| 48 | ||
| 49 | public function first($columns = ['*']) |
|
| 50 | { |
|
| @@ 49-55 (lines=7) @@ | ||
| 46 | }); |
|
| 47 | } |
|
| 48 | ||
| 49 | public function first($columns = ['*']) |
|
| 50 | { |
|
| 51 | return $this->cache($this->makeCacheTags()) |
|
| 52 | ->rememberForever($this->makeCacheKey($columns) . '-first', function () use ($columns) { |
|
| 53 | return parent::first($columns); |
|
| 54 | }); |
|
| 55 | } |
|
| 56 | ||
| 57 | public function get($columns = ['*']) |
|
| 58 | { |
|
| @@ 57-63 (lines=7) @@ | ||
| 54 | }); |
|
| 55 | } |
|
| 56 | ||
| 57 | public function get($columns = ['*']) |
|
| 58 | { |
|
| 59 | return $this->cache($this->makeCacheTags()) |
|
| 60 | ->rememberForever($this->makeCacheKey($columns), function () use ($columns) { |
|
| 61 | return parent::get($columns); |
|
| 62 | }); |
|
| 63 | } |
|
| 64 | ||
| 65 | public function max($column) |
|
| 66 | { |
|
| @@ 65-71 (lines=7) @@ | ||
| 62 | }); |
|
| 63 | } |
|
| 64 | ||
| 65 | public function max($column) |
|
| 66 | { |
|
| 67 | return $this->cache($this->makeCacheTags()) |
|
| 68 | ->rememberForever($this->makeCacheKey() . "-max_{$column}", function () use ($column) { |
|
| 69 | return parent::max($column); |
|
| 70 | }); |
|
| 71 | } |
|
| 72 | ||
| 73 | public function min($column) |
|
| 74 | { |
|
| @@ 73-79 (lines=7) @@ | ||
| 70 | }); |
|
| 71 | } |
|
| 72 | ||
| 73 | public function min($column) |
|
| 74 | { |
|
| 75 | return $this->cache($this->makeCacheTags()) |
|
| 76 | ->rememberForever($this->makeCacheKey() . "-min_{$column}", function () use ($column) { |
|
| 77 | return parent::min($column); |
|
| 78 | }); |
|
| 79 | } |
|
| 80 | ||
| 81 | public function pluck($column, $key = null) |
|
| 82 | { |
|
| @@ 95-101 (lines=7) @@ | ||
| 92 | }); |
|
| 93 | } |
|
| 94 | ||
| 95 | public function sum($column) |
|
| 96 | { |
|
| 97 | return $this->cache($this->makeCacheTags()) |
|
| 98 | ->rememberForever($this->makeCacheKey() . "-sum_{$column}", function () use ($column) { |
|
| 99 | return parent::sum($column); |
|
| 100 | }); |
|
| 101 | } |
|
| 102 | } |
|
| 103 | ||