PHP code example of sadekd / nova-opening-hours-field

1. Go to this page and download the library: Download sadekd/nova-opening-hours-field library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sadekd / nova-opening-hours-field example snippets


$table->json('opening_hours');  // can be ->nullable()

protected $casts = [
    'opening_hours' => 'array',
];

NovaOpeningHoursField::make(__('Opening Hours'), 'opening_hours'),
// ->allowExceptions(FALSE)    // TRUE by default
// ->allowOverflowMidnight(TRUE)  // FALSE by default
// ->useTextInputs(TRUE)  // FALSE by default