for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Yajra\Address\Repositories\Cities;
use Yajra\Address\Entities\City;
use Yajra\Address\Repositories\EloquentBaseRepository;
class CitiesRepositoryEloquent extends EloquentBaseRepository implements CitiesRepository
{
/**
* Get cities by region ID and province ID.
*
* @param int $regionId
* @param int $provinceId
* @return \Illuminate\Database\Eloquent\Collection
*/
public function getByProvinceAndRegion($regionId, $provinceId)
return $this->getModel()
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.
->newQuery()
->where('region_id', $regionId)
->where('province_id', $provinceId)
->orderBy('name', 'asc')
->get();
}
* Get repository model.
* @return City
public function getModel()
$model = config('address.models.city', City::class);
return new $model;
* Get cities by region.
public function getByRegion($regionId)
* Get cities by province.
public function getByProvince($provinceId)
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.