Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As with #22484 , when inserting a pivot record via `->attach()` the `InteractsWithPivotTable.php` trait doesn't check to see if the pivot table has a model representation. It' simply finds the table name and inserts a new record. Because of this, the timestamps are passed as `Carbon` instances and then turn to strings via its `toString()` method. If the consumer is using a pivot Model, it should use that models dateFormat to format by, not the `toString()` method. This simply news-up the pivot model, fetches it's dateformat and formats the `$fresh` date against it.
- Loading branch information