Files
water_new/modules/Notification/Routes/api.php
2023-03-08 09:16:04 +08:00

27 lines
795 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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