checkCustomer($customers_model, $post)){ $customers_model->save($user); $this->addLettersList($post['project_id'],$customers_model->id); return $customers_model; } } public function checkCustomer($customers_model, $post){ $this->customer = $customers_model->findFirst("email = '{$post['email']}'"); if($this->customer instanceof \customersEmailList){ return true; } else { return false; } } public function addLatterListToNewCustomer($post,$customer){ if($this->is_new){ $this->addLettersList($post['project_id'],$this->customer->id); } } }