Invalid datetime format: 1292 Incorrect datetime value - Laravel 5.2

Since you're not using standard datetime format, define a mutator for each date. For example:

public function setRegistrationFromAttribute($value)
{
    $this->attributes['registration_from'] =  Carbon::parse($value);
}

I got the same error while trying to register user from the vue js frontend to laravel backend API.

The solution was updating the mysql strict mode to false. If anyone knows the cons of this approach, please leave your comments!

//config/database.php
'mysql' => [
    'strict' => false,
]

Tags:

Mysql

Php

Laravel