Download the PHP package webteractive/filament-browser-timezone without Composer
On this page you can find all versions of the php package webteractive/filament-browser-timezone. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webteractive/filament-browser-timezone
More information about webteractive/filament-browser-timezone
Files in webteractive/filament-browser-timezone
Package filament-browser-timezone
Short Description A Filament plugin to detect user's browser timezone and make it available to Tables, Forms, and Infolist via session
License MIT
Homepage https://github.com/webteractive/filament-browser-timezone
Informations about the package filament-browser-timezone
Filament Browser Timezone
A Filament package that automatically detects the user's browser timezone and makes it available to Filament resources, forms, and widgets via session storage.
Features
- 🕐 Automatic Detection: Detects browser timezone on page load
- 🔒 Session Storage: Stores timezone in Laravel session for backend access
- 🎯 Filament Integration: Seamlessly integrates with Filament v3, v4, and v5 via render hooks
- 🚀 Zero Configuration: Works out of the box with default settings
- 🛡️ Error Handling: Graceful fallbacks for unsupported browsers
- ⚡ Performance Optimized: Minimal impact on page load performance
- 🤖 AI-Friendly: Includes Laravel AI custom guidelines for better AI-assisted development
Installation
The package will be automatically discovered by Laravel.
Usage
Automatic Integration
The package automatically integrates with Filament and starts detecting timezone on every page load. No additional configuration required.
Accessing Browser Timezone
In Filament Resources, Forms, and Widgets
In Filament Tables
In Filament Forms
In Filament Widgets
Configuration
Publish the configuration file:
Configuration Options
Environment Variables
How It Works
- Automatic Integration: The package automatically integrates with Filament panels using render hooks
- Page Load: When a Filament page loads, the package automatically includes a hidden Livewire component
- JavaScript Detection: The component uses JavaScript to detect the browser's timezone using
Intl.DateTimeFormat().resolvedOptions().timeZone - Session Storage: The detected timezone is sent to the server via Livewire and stored in the Laravel session
- Filament Integration: Your Filament resources, forms, and widgets can now access the timezone using the
BrowserTimezonehelper class
Filament Features
- Automatic Detection: Works out of the box with all Filament panels
- Render Hook Integration: Uses Filament's render hook system for seamless integration
- Livewire Component: Built with Livewire for optimal performance
- Session Management: Integrates with Laravel's session system
Browser Compatibility
The package uses the modern Intl.DateTimeFormat API which is supported by:
- Chrome 24+
- Firefox 29+
- Safari 10+
- Edge 12+
For unsupported browsers, the package will use the configured fallback timezone.
Version Compatibility
| Package Version | Filament Version | Livewire Version | Laravel Version | PHP Version |
|---|---|---|---|---|
| 1.x | ^3.0||^4.0||^5.0 | ^3.0||^4.0 | ^10.0||^11.28||^12.0 | ^8.2 |
Note: Filament v3 and v4 use Livewire v3, while Filament v5 uses Livewire v4. This package supports both Livewire versions seamlessly.
Laravel AI Guidelines
This package includes custom AI guidelines for Laravel 12.x AI features. When using AI assistants with Laravel 12.x projects, the assistant will have access to comprehensive documentation about this package's usage patterns, best practices, and troubleshooting tips.
The AI guidelines are located in ai/custom-guidelines.md and provide:
- Complete API reference
- Common usage patterns for Tables, Forms, and Widgets
- Troubleshooting guides
- Best practices and examples
- Common mistakes to avoid
Testing
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-browser-timezone with dependencies
spatie/laravel-package-tools Version ^1.16
laravel/framework Version ^10.0||^11.28.0||^12.0||^13.0
filament/filament Version ^3.0||^4.0||^5.0
livewire/livewire Version ^3.0||^4.0