Skip to content

larswnd/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.9%
  • PHP 18.5%
  • JavaScript 18.1%
  • SCSS 1.5%