Closed miken32 closed 3 months ago
@miken32 the patch is intended for Collection, right? I tried using an Eloquent model with a date but the serialization is still the same and returns something like 2024-08-11T10:23:57.000000Z
where the expectation is 2024-08-11 10:23:57
.
The update was to the helper class so I would have expected it to apply to both, but I was unable to check with a query builder instance as easily. Looking closer, I wonder if it's exiting Helper::convertToArray()
early due to that first code block looking for ignore_getters
?
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
The patch only applies to collection/array data sources.
For Eloquent, it is converted to an array thus making the model date serializer take effect. This explains why we still get 2024-08-11T10:23:57.000000Z
when using an eloquent data source.
Release on https://github.com/yajra/laravel-datatables/releases/tag/v11.1.4, 🚀 Thanks!
Resolves #3156 and lets the transformer deal with date formatting as intended.