Answer the question
In order to leave comments, you need to log in
Model binding does not work without adding middleware('web') to the route - how so?
Model binding did not want to work in any way until I added ->middleware('web') to the route.
I found the solution by googling here: https://tyapk.ru/blog/post/laravel-route-model-bin..
But this is bullshit ! ))))))
Why doesn't it work without it? Who had it? Got it? What exactly is the problem? And how to remove this crutch from there?
Thank you.
upd: it turned out that ->middleware('api') is also good )) I analyze it further))
Answer the question
In order to leave comments, you need to log in
https://laravel.com/api/5.5/Illuminate/Routing/Mid...
Try adding this to your routes, you can do it where you registered
But I have a "self-made" file with routes))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question