PHPackages                             rhukster/filament-geosearch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rhukster/filament-geosearch

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rhukster/filament-geosearch
===========================

Implementation of GeoSearch as a Filament Form Field

1.0.0(2y ago)013MITPHPPHP ^8.0

Since Jul 18Pushed 2y agoCompare

[ Source](https://github.com/rhukster/filament-geosearch)[ Packagist](https://packagist.org/packages/rhukster/filament-geosearch)[ Docs](https://github.com/rhukster/filament-geosearch)[ RSS](/packages/rhukster-filament-geosearch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Filament GeoSearch
==================

[](#filament-geosearch)

Forked from  to add customizable providers w/APIs and other tweaks.

[![Latest Version on Packagist](https://camo.githubusercontent.com/e3e548404cd744db5487d919f59fff99663ddad7ad2eb5e20a862cd9e659d471/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7268756b737465722f66696c616d656e742d67656f7365617263682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rhukster/filament-geosearch)[![Total Downloads](https://camo.githubusercontent.com/0e91cc62dd25597bdc0bb4f552618e1d334e373eea6b16ae93f4bb037f23caf7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7268756b737465722f66696c616d656e742d67656f7365617263682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rhukster/filament-geosearch)

This package provides a Filament Form Field integration of the LeafLet GeoSearch package

[![Filament GeoSearch](filament-geosearch.png)](filament-geosearch.png)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require rhukster/filament-geosearch
```

You need to publish assets used by this package:

```
php artisan vendor:publish --tag=filament-geosearch-assets
```

If you are using this package with `Filament administration`, add this lines to the `boot()` function of your `AppServiceProvider`

```
public function boot()
{
    // ...
    Filament::serving(function () {
        // ...
        Filament::registerStyles([
            asset('filament/assets/css/leaflet.css'),
            asset('filament/assets/css/geosearch.css'),
        ]);
        Filament::registerScripts([
            asset('filament/assets/js/leaflet.js'),
            asset('filament/assets/js/geosearch.umd.js'),
        ], true);
        // ...
    });
    // ...
}
```

**Important: Don't forget the `true` flag on the `registerScripts` to make the scripts loaded before Filament core scripts**

- If you are using this package without `Filament administration` (only with `Filament forms`), you can include the styles and scripts into your html layout.

Usage
-----

[](#usage)

### Model configuration

[](#model-configuration)

In your model you need to add the location column cast:

```
