Skip to content

Commit ad70cad

Browse files
committed
Update readme
1 parent 6b08f67 commit ad70cad

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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.

0 commit comments

Comments
 (0)