mercredi 29 mars 2017

Why Faker does not return Datetime Object?

I am doing Laravel Testing and when I use faker->datetime() or faker->dateTime($max = 'now') for created and updated at but it always give me this error?

Error Message '2017-03-29 14:21:48' does not match expected type "object".

'created_at' => $faker->dateTime($max = 'now'),
'updated_at' => $faker->dateTime($max = 'now')

Aucun commentaire:

Enregistrer un commentaire