Skip to content

codana-agency/nova-opening-hours-field

 
 

Repository files navigation

Nova Opening Hours Field

Laravel Nova custom field for Spatie Opening Hours

Screenshot Index

Screenshot Form

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require sadekd/nova-opening-hours-field

Usage

Laravel Migration

$table->json('opening_hours');

Laravel Model

protected $casts = [
    'opening_hours' => 'array',
];

Nova Resource

NovaOpeningHoursField::make('opening_hours'),

TODO

  • Explode interval input => time fields
  • Validation
  • Localization
  • Exceptions
  • Tests

License

The MIT License (MIT). Please see License File for more information.

Packages

No packages published

Languages

  • Vue 61.0%
  • PHP 20.7%
  • JavaScript 16.9%
  • SCSS 1.4%