sadekd/nova-opening-hours-field

Laravel Nova custom field for Spatie Opening Hours

v1.0.6 2021-06-15 14:01 UTC

This package is auto-updated.

Last update: 2021-07-26 20:06:58 UTC


README

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.