pushCriteria(app(RequestCriteria::class)); } /** * @param $template * @param $email * @param int $batch_id * @return SmsQueue * @throws \Prettus\Validator\Exceptions\ValidatorException */ public function createRecord($template, $email, $batch_id = 0) { $attribute['batch_id']=$batch_id; $attribute['m_address']=$email; $attribute['m_subject']=$template->title; $attribute['m_body']=$template->value; return $this->create($attribute); } public function saveRecord($id, $status, $message = "") { $attribute['m_status']=$status; $attribute['m_sendtime']=time(); $attribute['error_message']=$message; $this->update($attribute, $id); } }