model = $model; } public function updateCustomer($id, $data) { $this->model = Customer::findOrFail($id); $this->model->fill($data); $this->model->save(); return $this->model; } public function updateCustomerFromLead($id, $data){ $lead = Lead::findOrFail($id); if(isset($data['customer']) && $lead->customer){ return $this->updateCustomer($lead->customer->id, $data['customer']); } } }