urameshibr / lumen-form-request

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

Method Validate doesnot existed #3

Closed ahmad-sa3d closed 6 years ago

ahmad-sa3d commented 6 years ago

Hello, urameshibr

i'm using your library, on lumen 5.6 i got an error that validation method doesnot exists

i saw the code and found that you are calling non existing method in service provider

this is the fix is the service provider, replace validate() with validateResolved()

public function boot() { $this->app->afterResolving(ValidatesWhenResolved::class, function ($resolved) { $resolved->validateResolved(); }); $this->app->resolving(FormRequest::class, function ($request, $app) { $this->initializeRequest($request, $app['request']); $request->setContainer($app)->setRedirector($app->make(Redirector::class)); }); }

urameshibr commented 6 years ago

Hello, @ahmad-sa3d , regards, could you make a Pull Request for this fix? Thanks, cya.