Level 5
You can implement an interface to all your models that will map every json request to your model attributes. Then type hint that interface in your controllers method
Hope this helps
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a JSON request and i need to change all object key names similar on my model object keys, i'm having a difficulty about nested array objects, and also dot notation is not working on this part.
Here is my code on my validation request:
Please or to participate in this conversation.