version('v1', [ 'namespace' => 'App\Http\Controllers\V1', ], function ($api) { //根据行为标识查询行为 $api->get('getBehaviorByIdentify', 'BehaviorController@getBehaviorByIdentify'); //登录+验签 $api->group(['middleware' => ['chxq_jwt_auth']], function ($api) { $api->post('post', 'PostController@create'); $api->get('post', 'PostController@index'); $api->get('post/detail', 'PostController@detail'); $api->get('post/suggest', 'PostController@suggestPost'); $api->post('post/comment', 'PostController@comment'); $api->get('post/comment', 'PostController@commentList'); $api->get('post/reply', 'PostController@replyList'); $api->get('topicCategory', 'CategoryController@index'); $api->get('topicCategory/getTopics', 'CategoryController@getTopics'); //关注推荐话题 $api->post('memberFollowTopic', 'MemberFollowTopic@memberFollowTopic'); //关注话题 $api->post('memberFollowTopic/follow', 'MemberFollowTopic@followTopic'); //取消关注 $api->delete('memberFollowTopic/cancel', 'MemberFollowTopic@cancelFollowTopic'); //关注话题列表 $api->get('memberFollowTopic', 'MemberFollowTopic@index'); //列表 $api->get('postCollect', 'PostCollectController@index'); }); });