Replies: 1 comment
-
Sorry but I need more information to understand what you're facing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am working with Laravel 11 and I have a doubt.
Doubt
Use
$this->middleware()
was deprecated when we use it in the constructor of theAuthController
class?When I use it throws an error when I make a request and the IDE says that the function is not defined
My solution
Then, I delete these line and I placed the middleware in the
api.php
file.I wrote to like this:
Also, I only write
api
into the function middleware and notauth:api
PD: Using postman I added
Accept: application/json
in headers to retrieve the correct errorsBeta Was this translation helpful? Give feedback.
All reactions