public function sendEmailVerificationNotification()
{
$this->notify(new VerificationEmail());
}
protected function buildMailMessage($url)
{
return (new MailMessage)
->mailer('activate')
->from('activate@example.com', config('app.name'))
->subject(Lang::get('Verify Email Address'))
->line(Lang::get('Please click the button below to verify your email address.'))
->action(Lang::get('Verify Email Address'), $url)
->line(Lang::get('If you did not create an account, no further action is required.'));
}
public static function check2()
{
$url = 'https://www.google.com/recaptcha/api/siteverify';
$data = array(
'secret' => Ts_App::getConfig('recaptcha2_priv_key'),
'response' => Request::getVar('g-recaptcha-response')
);
$query = http_build_query($data);
$options = array(
'http' => array (
'header' => "Content-Type: application/x-www-form-urlencoded\r\n".
"Content-Length: " . strlen($query)."\r\n".
"User-Agent:MyAgent/1.0\r\n",
'method' => 'POST',
'content' => $query
)
);
$context = stream_context_create($options);
$verify = file_get_contents($url, false, $context);
$captcha_success = json_decode($verify);
if ($captcha_success->success==false) {
return false;
} else if ($captcha_success->success==true) {
return true;
}
return false;
}
...->where('name', 'Вася')->where('lastname', 'Иванов');
...->where('name', 'Вася')->orWhere('lastname', 'Иванов');