jenssegers / jenssegers/model

$date-mutators support

Open
#31 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
394
Forks
59
PR merge metrics
No merged PRs in 30d

Description

setAttribute to support $dates
```
// If an attribute is listed as a "date", we'll convert it from a DateTime
// instance into a form proper for storage on the database tables using
// the connection grammar's date format. We will auto set the values.
elseif ($value && $this->isDateAttribute($key)) {
$value = $this->fromDateTime($value);
}
```
https://laravel.com/docs/7.x/eloquent-mutators#date-mutators

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.