laravel-shift / blueprint

A code generation tool for Laravel developers.
MIT License
2.82k stars 270 forks source link

Parse fake dates into Carbon objects #676

Closed jasonmccreary closed 6 months ago

jasonmccreary commented 6 months ago

Currently, Blueprint uses Faker dates for columns with a date data type. This either generates you a string or a DateTimeInterface object. Neither of these are readily useable for testing.

This PR parses the returned faker data into an Illuminate\Support\Carbon object. This allows it to be used more readily in tests.