From ae4cb28d040dca8db9a678978efd9ab63c6ea9fd Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 8 Mar 2018 09:20:09 -0600 Subject: [PATCH] use class --- .../Foundation/Providers/FoundationServiceProvider.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php index 9b5c6799d9a3..fe384e757d0f 100644 --- a/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php +++ b/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php @@ -2,6 +2,7 @@ namespace Illuminate\Foundation\Providers; +use Illuminate\Support\Str; use Illuminate\Http\Request; use Illuminate\Support\AggregateServiceProvider; @@ -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()); }); }