urameshibr / lumen-form-request

Laravel Form Request adaptation for Lumen framework
3 stars 1 forks source link

failedValidation throw error #7

Closed zubairIftikharKwe closed 4 years ago

zubairIftikharKwe commented 4 years ago
Lumen V6.3.3
urameshibr/lumen-form-request ^1.5

When try to used failedValidation i got error Declaration of App\Http\Requests\RegistrationRequest::failedValidation(App\Http\Requests\Validator $validator) should be compatible with Urameshibr\Requests\FormRequest::failedValidation(Illuminate\Contracts\Validation\Validator $validator) Code to get errors For Custom format

    protected function failedValidation(Validator $validator)
    {
        $error = collect($validator->errors())->collapse()->toArray();
    }

Remeber: In This Class Urameshibr\Requests\FormRequest failedValidation Method exist;