123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | Application Routes
- |--------------------------------------------------------------------------
- |
- | Here is where you can register all of the routes for an application.
- | It is a breeze. Simply tell Lumen the URIs it should respond to
- | and give it the Closure to call when that URI is requested.
- |
- */
- $api = app('Dingo\Api\Routing\Router');
- $api->version('v1', [
- 'namespace' => 'App\Http\Controllers',
- ], function ($api) {
- $api->group(['middleware' => 'jwt.chxq_auth'], function ($api) {
- //配置
- $api->get('config', 'ConfigController@index');
- //下载列表
- $api->get('download', 'DownloadController@index');
- //新增下载
- $api->post('download', 'DownloadController@create');
- $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/waste', 'PostController@waste');
- //回收站复原
- $api->put('post/waste', 'PostController@restore');
- //日志列表
- $api->get('post/log', 'PostController@log');
- });
- //新增话题分类
- $api->post('categoryCreate', 'CategoryController@create');
- //话题分类列表
- $api->get('categoryIndex', 'CategoryController@index');
- //话题分类详情
- $api->get('categoryView', 'CategoryController@view');
- //推荐分类
- $api->put('categoryIsSuggest', 'CategoryController@isSuggest');
- //编辑话题
- $api->put('categoryEdit', 'CategoryController@edit');
- //新增话题
- $api->post('topicCreate', 'TopicController@create');
- //列表
- $api->get('topicIndex', 'TopicController@index');
- });
- });
|