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()); }); }