Skip to content

Instantly share code, notes, and snippets.

@SwabTheDeck
SwabTheDeck / AppModel.php
Last active July 19, 2016 16:29 — forked from ReedD/AppModel.php
A CakePHP model function to find and sort by the distance from a given a latitude and longitude coordinate with the option to restrict to a given radius.
<?php
App::uses('Model', 'Model');
App::uses('String', 'Utility');
class AppModel extends Model {
/**
* @author Reed Dadoune
* distanceQuery