Dingo API 使用命令行artisan出错
### laravel8.5版本composer,Dongo Api后使用 Dongo API命令行工具
## 执行 php artisan api:routes 会报错。
Call to undefined method Dingo\Api\Routing\Router::flushMiddlewareGroups()
找到这个方法
/**
* Execute the console command.
*
* @return void
*/
public function handle()
{
$this->router->flushMiddlewareGroups();
if (empty($this->router->getRoutes())) {
return $this->error("Your application doesn't have any routes.");
}
if (empty($routes = $this->getRoutes())) {
return $this->error("Your application doesn't have any routes matching the given criteria.");
}
$this->displayRoutes($routes);
}
通过检查命名空间没发现问题,不知道为什么会报找不到方法。
推荐文章: