PHPackages                             zedmagdy/filament-business-hours - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zedmagdy/filament-business-hours

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zedmagdy/filament-business-hours
================================

A filament package for managing business hours with timezone support and exceptions.

v1.0.1(2mo ago)1570MITPHPPHP ^8.3

Since Apr 2Pushed 2mo agoCompare

[ Source](https://github.com/ZED-Magdy/filament-business-hours)[ Packagist](https://packagist.org/packages/zedmagdy/filament-business-hours)[ Docs](https://github.com/ZED-Magdy/filament-business-hours)[ RSS](/packages/zedmagdy-filament-business-hours/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (28)Versions (4)Used By (0)

Filament Business Hours
=======================

[](#filament-business-hours)

A Filament plugin for managing business hours with timezone support, multiple time slots per day, and exception handling.

Installation
------------

[](#installation)

```
composer require zedmagdy/filament-business-hours
```

Setup
-----

[](#setup)

### 1. Register the Plugin

[](#1-register-the-plugin)

In your Filament panel provider:

```
use ZEDMagdy\FilamentBusinessHours\FilamentBusinessHoursPlugin;

->plugins([
    FilamentBusinessHoursPlugin::make()
        ->timezone('Asia/Riyadh'), // optional
])
```

### 2. Add Database Columns

[](#2-add-database-columns)

Add a JSON column to your model's table:

```
Schema::table('branches', function (Blueprint $table) {
    $table->json('business_hours')->nullable();
});
```

### 3. Configure Your Model

[](#3-configure-your-model)

```
use ZEDMagdy\FilamentBusinessHours\Traits\HasBusinessHours;

class Branch extends Model
{
    use HasBusinessHours;

    protected function casts(): array
    {
        return [
            'business_hours' => 'array',
        ];
    }
}
```

Usage
-----

[](#usage)

### Form Field

[](#form-field)

```
use ZEDMagdy\FilamentBusinessHours\Forms\Components\BusinessHoursField;

BusinessHoursField::make('business_hours')
    ->timezone()              // show timezone selector (default: true)
    ->allowExceptions()       // show exceptions section (default: true)
    ->collapsible()           // collapsible day sections (default: true)
    ->defaultTimezone('UTC')  // default timezone for new records
    ->columnSpanFull()
```

### Table Column

[](#table-column)

```
use ZEDMagdy\FilamentBusinessHours\Tables\Columns\BusinessHoursColumn;

// Status badge (Open/Closed)
BusinessHoursColumn::make('business_hours')
    ->statusMode()

// Weekly schedule grid
BusinessHoursColumn::make('business_hours')
    ->scheduleMode()
```

### Infolist Entry

[](#infolist-entry)

```
use ZEDMagdy\FilamentBusinessHours\Infolists\Components\BusinessHoursEntry;

// Full schedule with exceptions
BusinessHoursEntry::make('business_hours')
    ->fullMode()

// Status badge only
BusinessHoursEntry::make('business_hours')
    ->statusMode()

// Compact single-line
BusinessHoursEntry::make('business_hours')
    ->compactMode()
```

### Model Methods

[](#model-methods)

```
$branch = Branch::first();

$branch->isOpen();              // true/false (current time)
$branch->isClosed();            // true/false
$branch->isOpenOn('monday');    // true/false
$branch->isClosedOn('sunday');  // true/false
$branch->nextOpen();            // Carbon instance
$branch->nextClose();           // Carbon instance
$branch->getBusinessTimezone(); // string
```

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag="filament-business-hours-config"
```

License
-------

[](#license)

MIT

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance83

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

2

Last Release

88d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b32df6c1ee21b76b908877053d87fb9d63aba06b089f47a81bfe808302bc00b3?d=identicon)[ZED-Magdy](/maintainers/ZED-Magdy)

---

Top Contributors

[![ZED-Magdy](https://avatars.githubusercontent.com/u/43310796?v=4)](https://github.com/ZED-Magdy "ZED-Magdy (10 commits)")

---

Tags

laravelfilamentopening-hoursbusiness hours

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/zedmagdy-filament-business-hours/health.svg)

```
[![Health](https://phpackages.com/badges/zedmagdy-filament-business-hours/health.svg)](https://phpackages.com/packages/zedmagdy-filament-business-hours)
```

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

274327.2k8](/packages/croustibat-filament-jobs-monitor)[stephenjude/filament-debugger

About

104162.2k2](/packages/stephenjude-filament-debugger)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

128192.3k3](/packages/dotswan-filament-map-picker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
