Jul 21, 2020
0
Level 1
Is it possible to determine JsonResource in RequestHandled event?
Hello.
Currently building API versioning for my project and stuck a bit. Is it possible to determine current JsonResource for response? On RequestHandled event $event->response->getOriginalContent() always references to the eloquent model.
Is it possible to get JsonResource instance or just class reference to resource used in this response?
I couldn't figure out by myself where Laravel converts JsonResource into response in their code.
Please or to participate in this conversation.