Skip to content

Commit c37b668

Browse files
author
Jhony Mota Oliveira
authored
Set custom attributes to validator
Laravel needs the custom attributes to Validator Replacer.
1 parent 9d77570 commit c37b668

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ApiExceptionsServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class ApiExceptionsServiceProvider extends ServiceProvider
1515
public function boot()
1616
{
1717
// Set custom validation resolver
18-
$this->app['validator']->resolver(function ($translator, $data, $rules, $messages) {
19-
return new Validator($translator, $data, $rules, $messages);
18+
$this->app['validator']->resolver(function ($translator, $data, $rules, $messages, $attributes) {
19+
return new Validator($translator, $data, $rules, $messages, $attributes);
2020
});
2121

2222
$this->loadViewsFrom(__DIR__.'/../resources/views', 'laravel-api-exceptions');

0 commit comments

Comments
 (0)