/** * Gets the query records and caches them. * * @param array $columns * @return mixed */ public function get($columns = array('*')) { $key = $this->generateCacheKey(); $result = $this->cache->tags($this->getCacheTag())->remember($key, $this->duration, function () use($columns) { return $this->repository->get($columns); }); $this->resetScope(); return $result; }