public function updateCosts($costId, Request $req){
$cost = CostsBudgets::find($costId);
$cost->name = $req->input('name');
$cost->count = $req->input('count');
$cost->price = $req->input('price');
$cost->category_budgets_id = $req->input('category_id');
$cnt = $cost->count;
$prc = $cost->price;
$total = (float)$prc * (float)$cnt;
$cost->countTotalCosts = $total;
$cat = CategoryBudgets::find($cost->category_budgets_id);
$cost->save();
return redirect()->route('budgetDetail', ['budget'=>$cat->budgets_id]);
}
Если метод save в конце, то код до сохранения просто не доходит, тк выше есть return