jeffersongoncalves / filament-open-hours
Opening hours for Filament: manage the weekly schedule, holidays, special dates and timezone from a settings page and show an open/closed status widget, powered by laravel-open-hours.
Package info
github.com/jeffersongoncalves/filament-open-hours
pkg:composer/jeffersongoncalves/filament-open-hours
Requires
- php: ^8.2
- filament/filament: ^5.3
- filament/spatie-laravel-settings-plugin: ^5.3
- jeffersongoncalves/laravel-open-hours: ^1.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.0
- orchestra/testbench: ^10.0|^11.0
- pestphp/pest: ^3.0|^4.0
- pestphp/pest-plugin-laravel: ^3.0|^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-10 19:40:04 UTC
README
Filament Open Hours
Manage your business opening hours from the Filament panel — weekly schedule, holidays and special dates (one-off or every year) and timezone — and see at a glance whether you're open right now.
Built on jeffersongoncalves/laravel-open-hours, which stores the schedule with Spatie Laravel Settings and gives your site isOpen(), nextOpen(), the @openhours Blade directive and an "Open now · closes at 18:00" component.
Compatibility
| Branch | Filament | Package version |
|---|---|---|
| 1.x | 3.x | ^1.0 |
| 2.x | 4.x | ^2.0 |
| 3.x | 5.x | ^3.0 |
Installation
composer require jeffersongoncalves/filament-open-hours:"^3.0"
php artisan migrate
The settings migration seeds Monday–Friday 09:00–18:00 (change the defaults in config/open-hours.php before migrating if you like).
Usage
Add the plugin to your panel provider:
use JeffersonGoncalves\Filament\OpenHours\OpenHoursPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ OpenHoursPlugin::make(), ]); }
Then open Opening hours:
| Section | |
|---|---|
| Weekly schedule | Timezone (empty = app timezone) and the opening ranges of each day — 09:00-12:00, 13:00-18:00, overnight 22:00-02:00. A day with no range is closed. |
| Holidays and special dates | A date, optionally every year, with its own ranges (none = closed) and a note. |
Overlapping or malformed ranges are rejected on save. The dashboard gets an Opening hours widget showing Open / Closed and when that changes.
On your site:
<x-open-hours::status class="badge" /> @openhours <a href="https://wa.me/5511999999999">Chat with us</a> @else <p>We're closed right now — leave a message.</p> @endopenhours
Customization
OpenHoursPlugin::make() ->navigationGroup('Settings') ->settingsPage(false) // don't register the settings page ->widget(false), // don't add the dashboard widget
Requirements
- PHP 8.2 or higher
- Filament 5.x
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
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.
