atymic/laravel-dateinterval-cast
A Laravel Eloquent cast that converts database values to and from PHP DateInterval objects, letting you store intervals in your models and access them as native DateInterval instances without manual parsing or conversion code.
A lightweight Laravel Eloquent cast for storing and retrieving PHP DateInterval objects. It maps interval attributes to database columns as ISO 8601 duration strings (e.g. P1Y2M3D), letting your models work with native DateInterval instances without manual serialization.
DateInterval casting on Eloquent modelsHow can I help you explore Laravel packages today?