option('con'); $param = $this->option('param'); if(!empty($con)) { switch ($con) { case 'otp': $id = Arr::get($param,'id',''); if(!empty($id)) { if(false !== $otpObj = OtpManager::getOtpEntry($id, OtpManager::STATUS_UNVERIFIED)) { if(true === $out = $otpObj->sendOtpOnSms($param)) { return Utility::handlerSendSuccess([],Lang::get('message.otp_success')); } else { return Utility::handlerSendFailed([\Config::get("constants.txt.txt_errors") => [$out]]); } } else { return Utility::handlerSendFailed([\Config::get("constants.txt.txt_errors") => ['Invalid OTP id']]); } } else { return Utility::handlerSendFailed([\Config::get("constants.txt.txt_errors") => ['Missing parameter SendSMS OTP']]); } break; default: return Utility::handlerSendFailed([\Config::get("constants.txt.txt_errors") => ['No case found to handle in SendSMS']]); } } else { return Utility::handlerSendFailed([Config::get("constants.txt.txt_errors") => ['Context is missing']]); } } }