I suppose I should state the error I am getting:
Declaration of App\Http\Requests\ContactFormRequest::response() should be compatible with Illuminate\Foundation\Http\FormRequest::response(array $errors)
If you don't need to change the response that the form request gives you you can just remove the forbiddenResponse() and response() methods. If you want to change them the error says you need to add the parameter array $errors to your method declaration. In this parameter you will get the errors that happened during validation.
So you need to change the line
public function response()
to
public function response(array $errors)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community