I'm using Lumen 5.8.4, Dingo package for making api and I'm trying to use third party package pearl (https://packagist.org/packages/pearl/lumen-request-validate) for form request validation because Lumen doesn't support it.
I've set up everything and validation logic: rules and messages works fine when I define them in class(through postmen I receive "this field is required" etc ), but when everything is fine, when all fields are OK (from frontend side) I got this message
{
"message": "Method App\\Http\\Requests\\StoreVehicleRequest::validate does not exist.",
"status_code": 500,
"debug": {
"line": 102,
"file": "E:\\Damjan\\Programiranje\\PHP\\Laravel\\Lumen\\automoto-lumen\\vendor\\illuminate\\support\\Traits\\Macroable.php",
"class": "BadMethodCallException",
"trace": [
"#0 E:\\Damjan\\Programiranje\\PHP\\Laravel\\Lumen\\automoto-lumen\\vendor\\dingo\\api\\src\\Provider\\LumenServiceProvider.php(58): Illuminate\\Http\\Request->__call('validate', Array)"...
What I see here that trace leads to dingos LumenServiceProvider where i have
$this->app->afterResolving(ValidatesWhenResolved::class, function ($resolved) {
$resolved->validate();
});
and I think this one should use pearls RequestServiceProvider, where I have.
$this->app->afterResolving(RequestAbstract::class, function ($resolved) {
$resolved->validateResolved();
});
Or I'm missing something here. Struggling with this whole day. Any ideas?