for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Yajra\Address\Repositories\Barangays;
use Yajra\Address\Entities\Barangay;
use Yajra\Address\Repositories\EloquentBaseRepository;
class BarangaysRepositoryEloquent extends EloquentBaseRepository implements BarangaysRepository
{
/**
* Get barangays by region, province and city ID.
*
* @param int $cityId
* @return \Illuminate\Database\Eloquent\Collection
*/
public function getByCity($cityId)
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('city_id', $cityId)
->orderBy('name', 'asc')
->get();
}
* Get repository model.
* @return \Illuminate\Database\Eloquent\Model
public function getModel()
$model = config('address.models.barangay', Barangay::class);
return new $model;
* @param int $regionId
* @param int $provinceId
public function getByProvinceRegionAndCityId($regionId, $provinceId, $cityId)
->where('region_id', $regionId)
->where('province_id', $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.