This commit is contained in:
2023-03-08 09:16:04 +08:00
commit e78454540f
1318 changed files with 210569 additions and 0 deletions

View 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');
});