Add the timestamp type for Doctrine/DBAL
marktopper/doctrine-dbal-timestamp-type is a Laravel package for add the timestamp type for doctrine/dbal.
It currently has 49 GitHub stars and 847.271 downloads on Packagist (latest version v1.1.0).
Install it with composer require marktopper/doctrine-dbal-timestamp-type.
Discover more Laravel packages by marktopper
or browse all Laravel packages to compare alternatives.
Last updated
Since Doctrine/DBAL does not support the MySQL Timestamp type, you might want to add it on your own using this package.
According to this issue, Doctrine/DBAL does not support MySQL-specific database types like this one. Therefor we must add it ourself.
composer require marktopper/doctrine-dbal-timestamp-type
Then add the type to Doctrine\DBAL:
\Doctrine\DBAL\Types\Type::addType('timestamp', 'MarkTopper\DoctrineDBALTimestampType\TimestampType');
You can use the Laravel Provider to ensure that the type is added to Doctrine\DBAL by adding the following to providers:
MarkTopper\DoctrineDBALTimestampType\Laravel5ServiceProvider::class,