behlulbozal/location-search

It's a package location search for Laravel

dev-main 2022-10-18 12:02 UTC

This package is not auto-updated.

Last update: 2025-07-23 01:14:43 UTC


README

Features

  • Find a location in a circle which one you give radius meters.
  • Find the distance location from anotrher location.
  • Get the Google Maps link. Just give the lat, long. Take whole link.

Location Search - PHP - Laravel

Tourist-Male-Holding-Map

Getting Started

Installing

composer require behlulbozal/location-search

Migration Types

Add this columns to migration with these names and types.

// Example Model Migration
 $table->double('latitude')->nullable();
 $table->double('longitude')->nullable();

Starting

use behlulbozal\LocationSearch\Location;
Location::FindInCircle($lat, $long, $radius, Example::class);

Usage

Find In A Circle

Location::FindInCircle($latitude, $longitude, $radius, Example::class);

Get Distance Between Two Location

Location::GetDistance($latitude1, $longitude1, $latitude2, $longitude2);

Get Google Link

Location::GoogleLink($latitude1, $longitude1);

Contribution

Get Google Link

You can create PR for upgrades. Open issues or solve the issues ;)

BEHLÜL BOZAL