dingo / api

A RESTful API package for the Laravel and Lumen frameworks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$api->resoure () report an error,flushMiddlewareGroups method not work

heian12345 opened this issue · comments

commented
Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 8.57.0
Package version 3.0.7
PHP version 7.3.29

Actual Behaviour

In routing admin.php, $api->resoure () reports an error Dingo\Api\Routing\Router::resoure method is not defined, but $api->get () is normal

屏幕截图 2021-08-29 214420

The following is the error code, line 24.

屏幕截图 2021-08-29 214200

Expected Behaviour

Online search found that the solution to the problem in the issue of the dingo/api github project is vendor\dingo\api\src\Routing\Router.php Finally, the flushMiddlewareGroups method is added, and the bug is fixed after v3.0.6. My current version is 3.0. 7, and there is flushMiddlewareGroups method in this version, it still doesn't work, also try to downgrade to 3.0.6 and still report the same error.

Steps to Reproduce

Just use $api->resoure () ,I tried to reinstall Dingo/Api midway, but nothing worked.

commented

Sorry,I found that resource is written as 'resoure'.