1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?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\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');
- });
- });
|