dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.33k stars 1.25k forks source link

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

Closed heian12345 closed 2 years ago

heian12345 commented 2 years ago
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.

heian12345 commented 2 years ago

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