Skip to content

Instantly share code, notes, and snippets.

@ferdiunal
Created August 22, 2016 07:34
Show Gist options
  • Save ferdiunal/1018112bb2816b7bed5ac1fc5fcba744 to your computer and use it in GitHub Desktop.
Save ferdiunal/1018112bb2816b7bed5ac1fc5fcba744 to your computer and use it in GitHub Desktop.
Reminder Requests
<?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class Reminder extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return false;
}
/**
* Get the validation rules that apply to the request.
* @return array
*/
public function rules()
{
return [
'email' => 'required|email',
'g-recaptcha-response' => 'required|captcha',
];
}
public function messages()
{
return [
'email.required' => 'E-posta adresin gerekli.',
'email.email' => 'Geçerli bir e-posta adresi girin.',
'g-recaptcha-response.required' => 'Robot olmadığını bilmem gerek.',
'g-recaptcha-response.captcha' => 'Robot olmadığını bilmemedim.',
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment