We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4149c4e commit 97c9220Copy full SHA for 97c9220
src/Routing/Route.php
@@ -356,8 +356,8 @@ public function getMiddleware()
356
*/
357
public function isProtected()
358
{
359
- if (isset($this->middleware['api.auth'])) {
360
- if ($this->controller) {
+ if (isset($this->middleware['api.auth']) || in_array('api.auth', $this->middleware)) {
+ if ($this->controller && isset($this->middleware['api.auth'])) {
361
return $this->optionsApplyToControllerMethod($this->middleware['api.auth']);
362
}
363
0 commit comments