Download the PHP package jeffersongoncalves/laravel-open-hours without Composer
On this page you can find all versions of the php package jeffersongoncalves/laravel-open-hours. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jeffersongoncalves/laravel-open-hours
More information about jeffersongoncalves/laravel-open-hours
Files in jeffersongoncalves/laravel-open-hours
Package laravel-open-hours
Short Description Business opening hours for Laravel, stored with spatie/laravel-settings: weekly schedule, holidays and special dates, timezone, isOpen/nextOpen helpers, a Blade directive and a status component.
License MIT
Homepage https://github.com/jeffersongoncalves/laravel-open-hours
Informations about the package laravel-open-hours
Laravel Open Hours
Your business opening hours, editable at runtime: a weekly schedule, holidays and special dates (one-off or every year) and a timezone, stored with spatie/laravel-settings and evaluated by spatie/opening-hours. Ask whether you're open, when you open or close next, or drop a ready-made "Open now · closes at 18:00" badge into any Blade view.
For an admin UI, use jeffersongoncalves/filament-open-hours.
Installation
The settings migration seeds the schedule from config/open-hours.php (Monday–Friday 09:00–18:00 by default). Publish the config first if you want other defaults:
Usage
Blade
The component renders a <span class="open-hours-status open-hours-status--open|--closed"> with the status text in the app locale (19 languages included).
Editing the schedule
Ranges are HH:MM-HH:MM, several per day, overnight ranges (22:00-02:00) allowed. OpenHours::definition($week, $exceptions) throws on an invalid range, so you can use it to validate input.
If the settings can't be read yet (migrations pending) the config defaults are used.
Testing
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
- Jefferson Gonçalves
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-open-hours with dependencies
laravel/framework Version ^12.0|^13.0
spatie/laravel-package-tools Version ^1.16
spatie/laravel-settings Version ^3.0
spatie/opening-hours Version ^4.2