nova-opening-hours-field icon indicating copy to clipboard operation
nova-opening-hours-field copied to clipboard

How to add data (description) for each day or exception?

Open mikhi opened this issue 2 years ago • 1 comments

Hi, thanks for a great looking plugin.

I'm looking for a way to customise the message of each day or exception. In spatie documentation i found that the json structure can hold a key data

My question: is there a way to add data in definitions of day or exception?

$openingHours = OpeningHours::create([ 'monday' => [ 'data' => 'Typical Monday', '09:00-12:00', '13:00-18:00', ], 'tuesday' => [ '09:00-12:00', '13:00-18:00', [ '19:00-21:00', 'data' => 'Extra on Tuesday evening', ], ], 'exceptions' => [ '2016-12-25' => [ 'data' => 'Closed for Christmas', ], ], ]);

mikhi avatar Feb 21 '23 15:02 mikhi

Hi, thanks for your question 🙂

Actually that's not impemented, but I am open for PR.

Package is not actively developed for the reason, I dont have access/licence to actual Nova. 😢

Is there a way to get it just for local dev purposes/package development?

sadekd avatar Feb 21 '23 16:02 sadekd