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 3acced1 + 0dfbcd0 commit aeb1541Copy full SHA for aeb1541
src/LaravelRequestDocs.php
@@ -2,11 +2,8 @@
2
3
namespace Rakutentech\LaravelRequestDocs;
4
5
-use ErrorException;
6
use Route;
7
use ReflectionMethod;
8
-use Illuminate\Http\Request;
9
-use Illuminate\Foundation\Http\FormRequest;
10
use Illuminate\Support\Str;
11
use Exception;
12
use Throwable;
@@ -127,7 +124,8 @@ public function appendRequestRules(array $controllersInfo)
127
124
} catch (Throwable $th) {
128
125
//throw $th;
129
126
}
130
- if ($requestClass instanceof FormRequest) {
+
+ if ($requestClass && method_exists($requestClass, 'rules')) {
131
try {
132
$controllersInfo[$index]['rules'] = $this->flattenRules($requestClass->rules());
133
} catch (Exception $e) {
0 commit comments