Merge pull request #670 from ycrao/master

Update RouteCommand.php
pull/673/head
n0nag0n 12 hours ago committed by GitHub
commit b26598ff9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -65,7 +65,11 @@ class RouteCommand extends AbstractBaseCommand
if (!empty($route->middleware)) {
try {
$middlewares = array_map(function ($middleware) {
$middleware_class_name = explode("\\", get_class($middleware));
if (is_string($middleware)) {
$middleware_class_name = explode("\\", $middleware);
} else {
$middleware_class_name = explode("\\", get_class($middleware));
}
return preg_match("/^class@anonymous/", end($middleware_class_name)) ? 'Anonymous' : end($middleware_class_name);
}, $route->middleware);
} catch (\TypeError $e) {

@ -113,7 +113,7 @@ PHP;
| /post | POST, OPTIONS | | No | Closure |
| /delete | DELETE, OPTIONS | | No | - |
| /put | PUT, OPTIONS | | No | - |
| /patch | PATCH, OPTIONS | | No | Bad Middleware |
| /patch | PATCH, OPTIONS | | No | SomeMiddleware |
+---------+--------------------+-------+----------+----------------+
output; // phpcs:ignore

Loading…
Cancel
Save