Skip to content

Instantly share code, notes, and snippets.

View ahmethelvaci's full-sized avatar

Ahmet Helvacı ahmethelvaci

View GitHub Profile
@ahmethelvaci
ahmethelvaci / laravel-nearby-locations-query-scope.php
Created February 13, 2018 11:15 — forked from stevenmaguire/laravel-nearby-locations-query-scope.php
Laravel (Illuminate) query builder scope to list neighboring locations within a given distance from a given location
<?php
/**
* Query builder scope to list neighboring locations
* within a given distance from a given location
*
* @param Illuminate\Database\Query\Builder $query Query builder instance
* @param mixed $lat Lattitude of given location
* @param mixed $lng Longitude of given location
* @param integer $radius Optional distance
$ git archive -o archive.zip HEAD $(git diff --name-only <commit_hash> <commit_hash>)