ctrlpanel/app/Http/Controllers/Auth/ForgotPasswordController.php

47 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2021-06-05 09:26:32 +00:00
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
2023-01-04 11:04:44 +00:00
use Illuminate\Http\Request;
2021-06-05 09:26:32 +00:00
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
2023-01-04 11:04:44 +00:00
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
protected function validateEmail(Request $request)
2023-01-04 11:04:44 +00:00
{
$this->validate($request, [
'email' => ['required', 'string', 'email', 'max:255'],
]);
if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true') {
2023-01-04 11:04:44 +00:00
$this->validate($request, [
'g-recaptcha-response' => 'required|recaptcha',
]);
}
}
2021-06-05 09:26:32 +00:00
}