Skip to content

Commit

Permalink
use class
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 8, 2018
1 parent 5638538 commit ae4cb28
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Illuminate\Foundation\Providers;

use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Support\AggregateServiceProvider;

Expand Down Expand Up @@ -39,7 +40,7 @@ public function registerRequestValidate()
validator()->validate($this->all(), $rules, ...$params);

return $this->only(collect($rules)->keys()->map(function ($rule) {
return str_contains($rule, '.') ? explode('.', $rule)[0] : $rule;
return Str::contains($rule, '.') ? explode('.', $rule)[0] : $rule;
})->unique()->toArray());
});
}
Expand Down

0 comments on commit ae4cb28

Please sign in to comment.