File "ForgotPasswordRequest.php"
Full Path: /home/isoftco/public_html/hrm/app/Http/Requests/Front/Login/ForgotPasswordRequest.php
File size: 857 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace App\Http\Requests\Front\Login;
use App\Classes\Reply;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Http\Exceptions\HttpResponseException;
class ForgotPasswordRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
protected function failedValidation(Validator $validator)
{
$response = Reply::failedOnly($validator);
throw new HttpResponseException(response()->json($response, 200));
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'email' => 'required|email'
];
}
}