I have some code like this
$editStuState = StuAtt::where(\'studentId\' , \'=\' , $id)->first();
$editStuState -> leave +=1;
$editStuState -
Trailing data is a Carbon error, it's because you probably use Postgres and your date returns milliseconds.
"created_at" => "2018-04-19 07:01:19.929554"
You can add the following method to your (base) model.
public function getDateFormat()
{
return 'Y-m-d H:i:s.u';
}
If you are using TIME WITH TIMEZONE in Postgres then the format should be:
Y-m-d H:i:s.uO