PHP code example of timdev / doctrine-date-interval

1. Go to this page and download the library: Download timdev/doctrine-date-interval 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/ */

    

timdev / doctrine-date-interval example snippets


\Doctrine\DBAL\Types\Type::addType('dateinterval', \TimDev\Doctrine\DBAL\Types\DateIntervalType::class);
$entityManager
    ->getConnection()
    ->getDatabasePlatform()
    ->registerDoctrineTypeMapping('dateinterval', 'dateinterval');