first
This commit is contained in:
26
modules/Notification/Routes/api.php
Normal file
26
modules/Notification/Routes/api.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::group([
|
||||
'prefix' => 'notifications',
|
||||
'namespace' => 'Api',
|
||||
'middleware' => config('api.route.middleware_guess'),
|
||||
], function (Router $router) {
|
||||
// 用户未读消息数量,不登陆返回0
|
||||
$router->get('counts', 'IndexController@counts');
|
||||
});
|
||||
|
||||
Route::group([
|
||||
'prefix' => 'notifications',
|
||||
'namespace' => 'Api',
|
||||
'middleware' => config('api.route.middleware_auth'),
|
||||
], function (Router $router) {
|
||||
$router->get('', 'IndexController@index');
|
||||
$router->get('{type}/list', 'IndexController@type');
|
||||
$router->put('{type?}', 'IndexController@markAsRead');
|
||||
$router->delete('{type?}', 'IndexController@clean');
|
||||
$router->get('{id}', 'IndexController@show');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user