$this->response->item ($topic, new TopicTransformer ()),请问怎么理解 item 中的第一个参数呢?
return $this->response->item($topic, new TopicTransformer());
不知道理解的对不对,TopicTransformer() 返回的是return
中内容,而 item($topic, new TopicTransformer());
中的 $topic
,是指指定$topic->id
的内容。
推荐文章: