Download the PHP package theabhishekin/filament-location without Composer

On this page you can find all versions of the php package theabhishekin/filament-location. 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-location

Filament Location

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A powerful Filament package for collecting and displaying user locations with Google Maps integration. This package provides easy-to-use location picker and display components for your Filament admin panels.

Features

Installation

You can install the package via Composer:

Publish the configuration file:

Add your Google Maps API key to your .env file:

Note: Make sure to enable the Maps JavaScript API and Geocoding API in your Google Cloud Console.

Configuration

The configuration file allows you to customize default settings:

Database Migration

Add location fields to your model's migration:

Model Setup

Add the HasLocation trait to your model:

Quick Example: User Resource

Here's a complete example of how to use the location components in a Filament resource:

Usage

LocationPicker Component

LocationColumn Component

Available Icon Types

Icon Type Description Default Color
home Home locations Blue
office Office locations Purple
check-in Check-in locations Green
check-out Check-out locations Orange
travel Travel locations Red

Use Cases

Distance Calculations

The HasLocation trait provides distance calculation utilities:

Security & HTTPS Requirements

⚠️ Important Security Notice:

The browser's Geolocation API requires a secure context to function properly. This means:

Error Handling

The package provides comprehensive error handling with user-friendly messages:

Error Type Message Description
HTTPS Required πŸ”’ Location services require a secure connection (HTTPS) Browser blocks geolocation on non-secure origins
Permission Denied 🚫 Location access denied. Please allow location permission User explicitly denied location access
Position Unavailable πŸ“ Location information is unavailable Device can't determine location
Timeout ⏱️ Location request timed out Location request exceeded timeout limit

All errors are displayed in a prominent red banner below the location button with:

Development Setup

For local development, ensure you're using:

Troubleshooting

Common Issues

1. Livewire Entanglement Error

Error: Livewire property ['data.location'] cannot be found

Solution: Ensure your Livewire component has the property that matches your field name:

2. HTTPS/Security Errors

Error: Only secure origins are allowed

Solutions:

3. Error Messages Not Showing

If error messages aren't displaying:

  1. Check console logs for JavaScript errors
  2. Verify Alpine.js is loaded before the LocationPicker
  3. Ensure CSS is published: php artisan vendor:publish --tag=filament-location-assets

Contributing

Please see CONTRIBUTING for details.

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-location with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
filament/filament Version ^3.0
illuminate/contracts Version ^10.0|^11.0
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 theabhishekin/filament-location contains the following files

Loading the files please wait ...