---
title: "Artisan commands — Opening Hours for Laravel | Roundly"
description: "Inspect any owner’s hours from the terminal, prune past exceptions and soft-deleted rows, and refresh materialized intervals."
url: https://roundly-consulting.com/open-source/docs/opening-hours-for-laravel/commands
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Opening Hours for Laravel](https://roundly-consulting.com/open-source/docs/opening-hours-for-laravel.md)

# Artisan commands

Three commands cover inspection and housekeeping:

```bash
php artisan opening-hours:show clinic 42 --calendar=pickup --date=2026-12-20 --days=14 --at=2026-12-24T10:00:00+01:00
php artisan opening-hours:prune --exceptions-after-days=30 --trashed-after-days=90 --dry-run
php artisan opening-hours:materialize --calendar=5 --sync
```

- opening-hours:show {owner} {id} — prints a status line (open until … / closed, opens …) and a table of dates, weekdays, sources, labels and hours. owner is a morph alias or a model class implementing OpeningHoursOwner; --days is capped at max\_query\_days.
- opening-hours:prune — soft-deletes one-off exceptions that ended more than N days ago (counted from today’s date at UTC−12, so an exception still in effect in any calendar’s timezone is kept) and permanently removes rows soft-deleted more than M days ago. Defaults come from prune.\*; --dry-run only reports. Both options take a whole number of days (0–36500) — anything else fails instead of being ignored. With neither configured it prints “Nothing to prune”.
- opening-hours:materialize — only with materialize.enabled; walks every live calendar (or the --calendar ids) and queues one unique job per calendar (none for a calendar whose job is still pending) unless --sync is given.

A sync without ids replaces schedules and exceptions — the old rows are soft-deleted — so schedule opening-hours:prune daily with prune.trashed\_after\_days to purge them.

## 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](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## 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.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/opening-hours-for-laravel.md)
