{"id":33948189,"url":"https://github.com/axkuechler/laravel-geoly","last_synced_at":"2026-04-02T01:30:51.456Z","repository":{"id":56943528,"uuid":"226726169","full_name":"axkuechler/laravel-geoly","owner":"axkuechler","description":"Perform fast and efficient radius searches on your Laravel Eloquent models.","archived":false,"fork":false,"pushed_at":"2021-04-20T07:22:21.000Z","size":15,"stargazers_count":42,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-02T10:50:04.252Z","etag":null,"topics":["distance","distance-calculation","eloquent","geolocation","laravel","latitude","latitude-and-longitude","longitude","model","radius","search"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axkuechler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-08T20:20:47.000Z","updated_at":"2024-08-25T01:33:51.000Z","dependencies_parsed_at":"2022-08-21T07:50:34.178Z","dependency_job_id":null,"html_url":"https://github.com/axkuechler/laravel-geoly","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/axkuechler/laravel-geoly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axkuechler%2Flaravel-geoly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axkuechler%2Flaravel-geoly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axkuechler%2Flaravel-geoly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axkuechler%2Flaravel-geoly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axkuechler","download_url":"https://codeload.github.com/axkuechler/laravel-geoly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axkuechler%2Flaravel-geoly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:05:07.454Z","status":"ssl_error","status_checked_at":"2026-04-02T00:56:46.496Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distance","distance-calculation","eloquent","geolocation","laravel","latitude","latitude-and-longitude","longitude","model","radius","search"],"created_at":"2025-12-12T18:29:27.724Z","updated_at":"2026-04-02T01:30:51.449Z","avatar_url":"https://github.com/axkuechler.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Geoly\n\n[![Packagist Version](https://img.shields.io/packagist/v/akuechler/laravel-geoly)](https://packagist.org/packages/akuechler/laravel-geoly)\n![PHP from Packagist](https://img.shields.io/packagist/php-v/akuechler/laravel-geoly)\n[![StyleCI](https://github.styleci.io/repos/226726169/shield?branch=master)](https://github.styleci.io/repos/226726169)\n[![GitHub](https://img.shields.io/github/license/akuechler/laravel-geoly)](https://github.com/akuechler/laravel-geoly/blob/master/LICENSE)\n\nPerform fast and efficient radius searches on your Laravel Eloquent models.\n\nLaravel Geoly provides a convenient way for your Laravel Eloquent models to query in a certain radius around a position. It is lightning fast by using a bounding box to cut down the possible results and calculating the distance only on the remaining subset. Laravel Geoly works on both MySQL and PostgreSQL.\n\n## Requirements\n\n* PHP 7.1+\n* Laravel 5+\n* Tested on MySQL and PostgreSQL\n\n## Installation\n\nSimply require the project via composer:\n\n`$ composer require akuechler/laravel-geoly`\n\n## How to use\n\nGeoly assumes the two columns `latitude` and `longitude` on your eloquent model. Simply add them to your migration if not present yet.\n\n```php\n$table-\u003edouble('latitude');\n$table-\u003edouble('longitude');\n``` \n\nIf you prefer to use other names for your database columns, specify them in your model.\n\n```php\nconst LATITUDE  = 'lat';\nconst LONGITUDE = 'lng';\n```\n\nUse the Geoly package within your Eloquent model.\n\n```php\nclass YourModel extends Model\n{\n    use Geoly;\n    ...\n}\n```\n\nTo search for all models within a specific radius around a position, add the `radius` scope to your query.\n\n```php\n$query = YourModel::radius($latitude, $longitude, $radius);\n$query-\u003eget();\n```\n\n## Credits\n\nThis project is heavily inspired by [Laravel Geographical](https://github.com/malhal/Laravel-Geographical) and [Movable Type Scripts](https://www.movable-type.co.uk/) article on [Selecting points within a bounding circle](https://www.movable-type.co.uk/scripts/latlong-db.html).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxkuechler%2Flaravel-geoly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxkuechler%2Flaravel-geoly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxkuechler%2Flaravel-geoly/lists"}