php artisan api:routes 报错
laravel 8.32.1 运行 php artisan api:routes 报错
Call to undefined method Dingo\Api\Routing\Router::flushMiddlewareGroups()
at D:\my\hy.xinxinxin.work\vendor\laravel\framework\src\Illuminate\Foundation\Console\RouteListCommand.php:70
66▕ * @return void
67▕ */
68▕ public function handle()
69▕ {
➜ 70▕ $this->router->flushMiddlewareGroups();
71▕
72▕ if (empty($this->router->getRoutes())) {
73▕ return $this->error("Your application doesn't have any routes.");
74▕ }
D:\my\hy.xinxinxin.work\vendor\dingo\api\src\Console\Command\Routes.php:86
Illuminate\Foundation\Console\RouteListCommand::handle() D:\my\hy.xinxinxin.work\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:36
Dingo\Api\Console\Command\Routes::handle()

关于 LearnKu
应该算
Dingo/api的bug见: github.com/dingo/api/issues/1770
解决
这种要改
vendor/dingo/api/src/Routing/Router.php,虽然破坏规范,但是也是比较快速简单的方式。