话题详情
This commit is contained in:
parent
c63c71fc39
commit
22501cc89a
|
@ -49,6 +49,11 @@ class TopicsController extends Controller
|
|||
return $this->response->paginator($topics, new TopicTransformer());
|
||||
}
|
||||
|
||||
public function show(Topic $topic)
|
||||
{
|
||||
return $this->response->item($topic, new TopicTransformer());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Topic $topic
|
||||
* @return \Dingo\Api\Http\Response
|
||||
|
|
|
@ -55,6 +55,8 @@ $api->version('v1', [
|
|||
$api->get('topics', 'TopicsController@index')->name('api.topics.index');
|
||||
//某用户的话题列表
|
||||
$api->get('users/{user}/topics', 'TopicsController@userIndex')->name('api.users.topics.index');
|
||||
//话题详情
|
||||
$api->get('topics/{topic}', 'TopicsController@show')->name('api.topics.show');
|
||||
});
|
||||
|
||||
// 需要 token 验证的接口
|
||||
|
|
Loading…
Reference in New Issue
Block a user