I use fractal flem packaging. I have a conversion class setting like this
class ConversationTransformer extends TransformerAbstract { public function transform (Conversation $conversation, $user) { return []; } }
however I get the absence of argument 2 exception to convert when trying to access it
$user = $this->people->get($this->user()); //conversations $conversations = $this->conversations->user($user); return $this->fractal->paginatedCollection($conversations, $user, new ConversationTransformer());
rest api php
MrFoh
source share