first(); if ($customer != null) { $customer->update([ 'last_point' => $customer->last_point + $row['point'] ]); return new CustomerPoint([ 'customer_id' => $customer->id, 'description' => $row['description'], 'point' => $row['point'], ]); } } }