| Total Complexity | 1 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | trait QueryScope |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Scope a query to find nearest location based on the given latitude and longitude. |
||
| 17 | * |
||
| 18 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
| 19 | * @param mixed $latitude |
||
| 20 | * @param mixed $longitude |
||
| 21 | * @return \Illuminate\Database\Eloquent\Builder |
||
| 22 | */ |
||
| 23 | public function scopeNearestLocation(Builder $query, $latitude, $longitude) |
||
| 44 |