I have some code like this
$editStuState = StuAtt::where(\'studentId\' , \'=\' , $id)->first();
$editStuState -> leave +=1;
$editStuState -
If you are using Postgres you have to add some lines to your Model(s). It happens because of TIME WITH TIMEZONE in Postgres.
Please also read Date Mutators as Laravel already has support for this baked in, simply put below line in your Model to override the default dateFormat for that model: https://laravel.com/docs/5.7/eloquent-mutators#date-mutators
Go to your App/Model (under app folder, exp. User, SomeModel) add below line:
protected $dateFormat = 'Y-m-d H:i:sO';
Best