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
Uh oh!
There was an error while loading. Please reload this page.
-
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 theAuthControllerclass?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.phpfile.I wrote to like this:
Also, I only write
apiinto the function middleware and notauth:apiPD: Using postman I added
Accept: application/jsonin headers to retrieve the correct errorsBeta Was this translation helpful? Give feedback.
All reactions