Error bindings models on routes using api #48093
-
Laravel Version10.19.0 PHP Version8.1.22 Database Driver & VersionMySql 8.1.0 DescriptionHello, I have an issue on my Laravel project, I use at my work 8.x laravel version with php 7.3.x, and use so much the resouce of binding the models directly on routes. So I started an personal project using laravel lastest version and this resource is not working, I already made a deep search on google, but nothing found. I tried to start new project and migrate the files, but still not working the binding. next an image about my test, I do the most simple test to ensure that is not me doing something wrong. this is the project: https://github.com/felipechiodini/hamburguer-api Steps To Reproduceusing api routes, try to bind an model directly on the route |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Moved to Discussions as this feels like a usage issue rather than a bug. |
Beta Was this translation helpful? Give feedback.
-
and you're sure user with id 7 does exist and has an email? |
Beta Was this translation helpful? Give feedback.
-
I already discovered what's wrong, and It was my fault, when I change my RouteServiceProvider I don't notice and I omited the middleware. |
Beta Was this translation helpful? Give feedback.
I already discovered what's wrong, and It was my fault, when I change my RouteServiceProvider I don't notice and I omited the middleware.