Laravel Array to string conversion not working

I want to update a totcosty field in the User table but it is throwing this error everytime and it is not updating the field

this is the function for execution:

 public static function cost(){}

$user_id = auth()->user()->id;
$user = User::find($user_id);
$total = Helper::totcost();
//dd($tot_amt);
$user->totcosty = $total;
$user->save();
}


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2SpGUo3
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time