NewWe open-sourced 50+ Laravel packages
Custom AI apps, agents and automation — Roundly ConsultingRoundly
All packages

Require the package, then publish and run the migrations — six tables, all prefixed opening_hours_. The service provider is auto-discovered, so there is nothing to register:

composer require roundly-consulting/opening-hours-for-laravel

php artisan vendor:publish --tag="opening-hours-migrations"
php artisan migrate

The config file and the translations (en, sk) are optional — publish them only to override defaults or wording:

php artisan vendor:publish --tag="opening-hours-config"
php artisan vendor:publish --tag="opening-hours-translations"

Publish tags

TagPublishes
opening-hours-migrationsSix timestamped migrations — publish-only; nothing is auto-loaded.
opening-hours-configconfig/opening-hours.php
opening-hours-translationslang/vendor/opening-hours/{en,sk}

UUID and ULID owners

If the models that own opening hours use UUID or ULID keys, set OPENING_HOURS_KEY_TYPE before running the migrations — it decides the owner_id column type in opening_hours_calendars and opening_hours_intervals. Matching ignores case and padding; any other value throws the toolkit’s InvalidConfigurationException when the migrations run:

# bigint (default), uuid or ulid — set before running the migrations
OPENING_HOURS_KEY_TYPE=uuid

Recommended scheduling

Two maintenance commands are meant to run daily — pruning (once prune.* is configured) and interval materialization (only with materialize.enabled):

// routes/console.php
use Illuminate\Support\Facades\Schedule;

Schedule::command('opening-hours:prune')->daily();         // with prune.* configured
Schedule::command('opening-hours:materialize')->daily();   // only with materialize.enabled

Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

More ways to support, including crypto

By donating, you agree to our donation terms.

Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.