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