for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Yajra\Address\Repositories\Regions;
use Illuminate\Contracts\Cache\Repository as Cache;
class CachingRegionsRepository extends RegionsRepositoryEloquent implements RegionsRepository
{
/**
* @var RegionsRepository
*/
protected $repository;
* @var Cache
protected $cache;
* CachingRegionsRepository constructor.
*
* @param RegionsRepository $repository
* @param Cache $cache
public function __construct(RegionsRepository $repository, Cache $cache)
$this->repository = $repository;
$this->cache = $cache;
parent::__construct();
}
* Get all records.
* @return \Illuminate\Database\Eloquent\Collection
public function all()
return $this->cache->rememberForever('regions.all', function () {
return $this->repository->getModel()->query()->orderBy('region_id', 'asc')->get();
orderBy()
Illuminate\Database\Eloquent\Builder
enforceOrderBy()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
});
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.