PHP code example of bookingbat / engine

1. Go to this page and download the library: Download bookingbat/engine 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/ */

    

bookingbat / engine example snippets


$availability = new Availability(array(
    array(
        'start' => '09:00:00',
        'end' => '11:00:00'
    ),
    array(
        'start' => '11:30:00',
        'end' => '16:00:00'
    ),
));

$newAvailability = $availability->addBooking(array(
    'start' => '15:30',
    'end' => '16:00'
));
`
array(
    array(
        'start' => '09:00:00',
        'end' => '11:00:00'
    ),
    array(
        'start' => '11:30:00',
        'end' => '15:30:00'
    ),
);