Download the PHP package arbermustafa/filament-locationpickr-field without Composer

On this page you can find all versions of the php package arbermustafa/filament-locationpickr-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-locationpickr-field

Filament LocationPickr Field

This package provides just a simplified location picker field within Filament using Google Maps based on the excellent work of Hugh Messenger.

Installation

You can install the package into a Laravel app that uses Filament via composer::

Filament V2 - if you are using Filament v2.x, you can use 1.x branch.

You can publish the config file with:

The config file contains default global customization options for map rendering, like: api key, default location, etc.

Optionally, you can publish the view using:

Setting your Google Maps API Key

All use of the Google Maps API requires an API key. If you don't have one, refer to Google's documentation.

Once you have a key, either add it to your .env file as:

... or publish and edit the filament-locationpickr-field.php config file.

Preparing the models

Add a location column to any model migration schema used for map data

and add the column to the model fillable array

If you have separate columns for lat and lng you can use a computed property on any model being used for map data and use a mutator which converts between separate lat and lng fields on your table, and a Google Point style array of 'lat' and 'lng' keys.

Usage

Form field

The form field can be used with no options, by simply adding this to your Filament Form schema:

The name used in the make() function must be the one you set up as your model's column/computed location property.

Full options

The full set of options is as follows. All option methods support closures, as well as direct values.

Infolist entry

The infolist entry can be used with no options, by simply adding this to your Filament Infolist schema:

The name used in the make() function must be the one you set up as your model's column/computed location property. The components accepts options like defaultZoom, defaultLocation and height.

Example usage in simple resource

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

If you want to contribute to this package, you may want to test it in a real Filament project:

Install the package in your app's composer.json:

Now run composer update.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-locationpickr-field with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/forms Version ^3.0
spatie/laravel-package-tools Version ^1.13.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package arbermustafa/filament-locationpickr-field contains the following files

Loading the files please wait ....