@@ 18-24 (lines=7) @@ | ||
15 | }); |
|
16 | } |
|
17 | ||
18 | public function count($columns = ['*']) |
|
19 | { |
|
20 | return $this->cache($this->makeCacheTags()) |
|
21 | ->rememberForever($this->makeCacheKey() . "-count", function () use ($columns) { |
|
22 | return parent::count($columns); |
|
23 | }); |
|
24 | } |
|
25 | ||
26 | public function cursor() |
|
27 | { |
|
@@ 69-75 (lines=7) @@ | ||
66 | }); |
|
67 | } |
|
68 | ||
69 | public function max($column) |
|
70 | { |
|
71 | return $this->cache($this->makeCacheTags()) |
|
72 | ->rememberForever($this->makeCacheKey() . "-max_{$column}", function () use ($column) { |
|
73 | return parent::max($column); |
|
74 | }); |
|
75 | } |
|
76 | ||
77 | public function min($column) |
|
78 | { |
|
@@ 10-16 (lines=7) @@ | ||
7 | { |
|
8 | use Cachable; |
|
9 | ||
10 | public function avg($column) |
|
11 | { |
|
12 | return $this->cache($this->makeCacheTags()) |
|
13 | ->rememberForever($this->makeCacheKey() . "-avg_{$column}", function () use ($column) { |
|
14 | return parent::avg($column); |
|
15 | }); |
|
16 | } |
|
17 | ||
18 | public function count($columns = ['*']) |
|
19 | { |
|
@@ 45-51 (lines=7) @@ | ||
42 | /** |
|
43 | * @SuppressWarnings(PHPMD.ShortVariable) |
|
44 | */ |
|
45 | public function find($id, $columns = ['*']) |
|
46 | { |
|
47 | return $this->cache($this->makeCacheTags()) |
|
48 | ->rememberForever($this->makeCacheKey($columns, $id), function () use ($id, $columns) { |
|
49 | return parent::find($id, $columns); |
|
50 | }); |
|
51 | } |
|
52 | ||
53 | public function first($columns = ['*']) |
|
54 | { |
|
@@ 53-59 (lines=7) @@ | ||
50 | }); |
|
51 | } |
|
52 | ||
53 | public function first($columns = ['*']) |
|
54 | { |
|
55 | return $this->cache($this->makeCacheTags()) |
|
56 | ->rememberForever($this->makeCacheKey($columns) . '-first', function () use ($columns) { |
|
57 | return parent::first($columns); |
|
58 | }); |
|
59 | } |
|
60 | ||
61 | public function get($columns = ['*']) |
|
62 | { |
|
@@ 61-67 (lines=7) @@ | ||
58 | }); |
|
59 | } |
|
60 | ||
61 | public function get($columns = ['*']) |
|
62 | { |
|
63 | return $this->cache($this->makeCacheTags()) |
|
64 | ->rememberForever($this->makeCacheKey($columns), function () use ($columns) { |
|
65 | return parent::get($columns); |
|
66 | }); |
|
67 | } |
|
68 | ||
69 | public function max($column) |
|
70 | { |
|
@@ 77-83 (lines=7) @@ | ||
74 | }); |
|
75 | } |
|
76 | ||
77 | public function min($column) |
|
78 | { |
|
79 | return $this->cache($this->makeCacheTags()) |
|
80 | ->rememberForever($this->makeCacheKey() . "-min_{$column}", function () use ($column) { |
|
81 | return parent::min($column); |
|
82 | }); |
|
83 | } |
|
84 | ||
85 | public function pluck($column, $key = null) |
|
86 | { |