version('v1', [ 'namespace' => 'App\Http\Controllers', ], function ($api) { $api->group(['middleware' => 'jwt.chxq_auth'], function ($api) { //配置 $api->get('config', 'ConfigController@index'); $api->group(['namespace' => 'Post'], function ($api) { //发布内容 $api->post('post', 'PostController@create'); //内容列表 $api->get('post', 'PostController@index'); //内容详情 $api->get('post/detail', 'PostController@detail'); //推荐内容 $api->put('post/suggest', 'PostController@suggest'); //删除内容 $api->delete('post/delete', 'PostController@delete'); //隐藏内容 $api->put('post/hide', 'PostController@hide'); //增加数据 $api->put('post/addData', 'PostController@addData'); //评论列表 $api->get('post/comment', 'PostController@commentList'); //评论&回复 $api->post('post/comment', 'PostController@comment'); //删除评论 $api->delete('post/comment/delete', 'PostController@commentDelete'); //日志列表 $api->get('post/log', 'PostController@log'); }); }); });