limenet/laravel-datetime-attributes
Set a datetime attribute separately using a date and a time. This is especially helpful for input[type=date] and input[type=time].
1,396
| Install | |
|---|---|
composer require limenet/laravel-datetime-attributes |
|
| Latest Version: | v1.2.0 |
| PHP: | ^8.3 |
| Laravel: | 12 · 13 |
| Older releases: | 5 – 11 |
| License: | MIT |
| Last Updated: | Jun 24, 2026 |
| Links: | GitHub · Packagist |
Maintainer: limenet
Laravel Datetime Attributes
Set a datetime attribute separately using a date and a time. This is especially helpful for input[type=date] and input[type=time]
Usage
<?php
use Illuminate\Database\Eloquent\Model as Base;
use Limenet\LaravelDatetimeAttributes\DateTimeTrait;
class Model extends Base
{
use DateTimeTrait;
public function getStartDateAttribute()
{
return $this->dtGetDate('start');
}
public function getStartTimeAttribute()
{
return $this->dtGetTime('start');
}
public function setStartDateAttribute($value)
{
$this->dtSetDate('start', $value);
}
public function setStartTimeAttribute($value)
{
$this->dtSetTime('start', $value);
}
}
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
644,549,754
9,698
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
423,477,751
607
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
399,241,428
4,660
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v1.2.0 | ^8.3 | ^12.0 | | MIT | |
| v1.1.0 | ^8.1 | ^10.0 | | MIT | |
| v1.0.0 | ^8.1 | ^10.0 | | MIT | |
| v0.3.0 | ^8.1 | ^10.0 | MIT | |
| v0.2.3 | ^8.0 | ^9.0 | | MIT | |
| v0.2.2 | ^8.0 | ^9.0 | MIT | |
| v0.2.1 | >=7.1 | 5.4.* | | MIT | |
| v0.2.0 | >=7.1 | 5.4.* | | MIT | |
| v0.1.5 | >=7.1 | 5.4.* | | MIT | |
| v0.1.4 | >=7.1 | 5.4.* | | MIT | |
| v0.1.3 | >=7.1 | 5.4.* | | MIT | |
| v0.1.2 | >=7.0 | ^5.4 | MIT | |
| v0.1.1 | >=7.0 | ^5.4 | MIT | |
| v0.1.0 | >=7.1 | ^5.4 | MIT |