Level 50
Maybe you are trying to resolve a model with implicit model binding:
https://mattstauffer.com/blog/implicit-model-binding-in-laravel-5-2/
I think gates are working based on an existing model, maybe that is where it fails?
Hope it helps!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Gate::allow not working in API routes using auth:api middleware. Is there a way to solve it
Please or to participate in this conversation.