We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 09ed581 + 06b952b commit 2194879Copy full SHA for 2194879
src/Generator.php
@@ -158,7 +158,7 @@ protected function getFormRules($action)
158
$parameters = $reflector->getParameters();
159
160
foreach ($parameters as $parameter) {
161
- $class = (string) $parameter->getType();
+ $class = optional($parameter->getType())->getName();
162
163
if (is_subclass_of($class, FormRequest::class)) {
164
return (new $class)->rules();
@@ -197,4 +197,4 @@ protected function getActionName($actionName)
197
198
return $actionName;
199
}
200
-}
+}
0 commit comments