I wanted to add a captcha to the Forgot Password form, so I ended up doing this to the default ForgotPasswordController:
use Validator; use \Illuminate\Http\Request; class ForgotPasswordController extends Controller { protected function validateEmail(Request $request) { Validator::make( $request->all(), [ 'email' => 'required|email', 'captcha' => 'required|captcha', // extra param to be validated ] )->validate(); } |
Only relevant bits are shown there.