File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Nova Opening Hours Field
2
+
3
+ Laravel Nova custom field for [ Spatie Opening Hours] ( https://github.com/spatie/opening-hours )
4
+
5
+ ## Installation
6
+
7
+ You can install the package in to a Laravel app that uses [ Nova] ( https://nova.laravel.com ) via composer:
8
+
9
+ ``` bash
10
+ composer require sadekd/nova-opening-hours-field
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Laravel Model
16
+
17
+ ``` php
18
+ protected $casts = [
19
+ 'opening_hours' => 'array',
20
+ ];
21
+ ```
22
+
23
+ Nova Resource
24
+
25
+ ``` php
26
+ public function fields(Request $request)
27
+ {
28
+ return [
29
+ ID::make(),
30
+ NovaOpeningHoursField::make('opening_hours'),
31
+ ...
32
+ ```
33
+
34
+ ## TODO
35
+
36
+ - [ ] Explode interval input => time fields
37
+ - [ ] Validation
38
+ - [ ] Localization
39
+ - [ ] Exceptions
40
+ - [ ] Tests
41
+
42
+ ## License
43
+
44
+ The MIT License (MIT). Please see [ License File] ( LICENSE.md ) for more information.
You can’t perform that action at this time.
0 commit comments