@@ -276,8 +276,7 @@ discard block |
||
276 | 276 | |
277 | 277 | return intval( |
278 | 278 | (!$this->keys->instanceOfModel) ? |
279 | - $this->redis->get($this->keys->visits . '_total') : |
|
280 | - $this->redis->zscore($this->keys->visits, $this->keys->id) |
|
279 | + $this->redis->get($this->keys->visits . '_total') : $this->redis->zscore($this->keys->visits, $this->keys->id) |
|
281 | 280 | ); |
282 | 281 | } |
283 | 282 | |
@@ -388,10 +387,10 @@ discard block |
||
388 | 387 | |
389 | 388 | return ($this->subject)::whereIn($this->keys->primary, $visitsIds) |
390 | 389 | ->get() |
391 | - ->sortBy(function ($subject) use ($visitsIds) { |
|
390 | + ->sortBy(function($subject) use ($visitsIds) { |
|
392 | 391 | return array_search($subject->{$this->keys->primary}, $visitsIds); |
393 | 392 | }) |
394 | - ->each(function ($subject) use ($cacheKey) { |
|
393 | + ->each(function($subject) use ($cacheKey) { |
|
395 | 394 | $this->redis->rpush($cacheKey, serialize($subject)); |
396 | 395 | }); |
397 | 396 | } |