diff --git a/src/Illuminate/View/Component.php b/src/Illuminate/View/Component.php index 733bfe4fa519..78fbed08f725 100644 --- a/src/Illuminate/View/Component.php +++ b/src/Illuminate/View/Component.php @@ -95,7 +95,7 @@ public static function ignoredParameterNames(): array ))->getConstructor(); if (! $constructor) { - static::$ignoredParameterNames[static::class] = []; + return static::$ignoredParameterNames[static::class] = []; } static::$ignoredParameterNames[static::class] = collect($constructor->getParameters())