pushCriteria(app(RequestCriteria::class)); } /** * @param $template * @param $mobile * @param int $utype * @param int $sender_id * @param int $batch_id * @return SmsQueue * @throws \Prettus\Validator\Exceptions\ValidatorException */ public function createRecord($template, $mobile, $utype = 0, $sender_id = 0, $batch_id = 0) { $attribute['batch_id']=$batch_id; $attribute['utype']=$utype; $attribute['sender_id']=$sender_id; $attribute['s_number']=$mobile; $attribute['s_body']=$template->value; $attribute['sms_id']=$template->id; return $this->create($attribute); } public function saveRecord($id, $status, $message = "") { $attribute['s_status']=$status; $attribute['s_sendtime']=time(); $attribute['error_message']=$message; $this->update($attribute, $id); } }