PHPackages                             tomhatzer/nova-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. tomhatzer/nova-business-hours

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

tomhatzer/nova-business-hours
=============================

Business hours field for Laravel Nova.

v0.1.1(5y ago)046[12 PRs](https://github.com/tomhatzer/nova-business-hours/pulls)MITVuePHP &gt;=7.4.0

Since Mar 14Pushed 3y agoCompare

[ Source](https://github.com/tomhatzer/nova-business-hours)[ Packagist](https://packagist.org/packages/tomhatzer/nova-business-hours)[ RSS](/packages/tomhatzer-nova-business-hours/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (15)Used By (0)

Nova Business Hours Field
=========================

[](#nova-business-hours-field)

This package offers a field for Nova to easily manage your business hours.

Install
-------

[](#install)

```
composer require tomhatzer/nova-business-hours
```

Usage
-----

[](#usage)

Add this line to your Nova resource fields array:

```
NovaBusinessHours::make('Business hours', 'business_hours'),
```

Compatibility
-------------

[](#compatibility)

### Using this package with spatie/open-hours

[](#using-this-package-with-spatieopen-hours)

Create a getter for your business hours field in your model like this:

```
public function getBusinessHoursAttribute($value)
{
    $jsonDecoded = json_decode($value);

    return collect($jsonDecoded)->transform(function($day) {
        return array_filter(
            array_map(function($item) {
                if($item->isOpen) {
                    return substr_replace($item->open, ':', 2, 0) . '-' . substr_replace($item->close, ':', 2, 0);
                }

                return null;
            }, $day)
        );
    })->all();
}
```

In this case the fields name will be `business_hours`. Customize this according to your database column name.

Afterwards you can use it to fill the `OpeningHours` class with your existing business hours like this:

```
// Add the use at the top of each file where you want to use the OpeningHours class:
use Spatie\OpeningHours\OpeningHours;

// Get your model instance
$model = Model::find(1);

// Fill the OpeningHours class with your business hours
$openingHours = OpeningHours::create($model->business_hours);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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 ~0 days

Total

2

Last Release

1881d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7a78e29597fc941f1f332d66890ddc285697e4f458f9d116115288e2a320f47?d=identicon)[tomhatzer](/maintainers/tomhatzer)

---

Top Contributors

[![tomhatzer](https://avatars.githubusercontent.com/u/3952168?v=4)](https://github.com/tomhatzer "tomhatzer (5 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/tomhatzer-nova-business-hours/health.svg)

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

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12218.4k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

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