system.php
4.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
use App\Http\Container\AdminSection\Controllers\System\BannerController;
use App\Http\Container\AdminSection\Controllers\System\Broker\PushConfigController;
use App\Http\Container\AdminSection\Controllers\System\Broker\PushLevelRecordController;
use App\Http\Container\AdminSection\Controllers\System\Broker\PushMatchRecordController;
use App\Http\Container\AdminSection\Controllers\System\Broker\UserConfigController;
use App\Http\Container\AdminSection\Controllers\System\ConfigController;
use App\Http\Container\AdminSection\Controllers\System\MaterialController;
use App\Http\Container\AdminSection\Controllers\System\NotificationController;
use App\Http\Container\AdminSection\Controllers\System\OperationLogController;
use App\Http\Container\AdminSection\Controllers\System\PermissionController;
use App\Http\Container\AdminSection\Controllers\System\ReportController;
use App\Http\Container\AdminSection\Controllers\System\RoleController;
use App\Http\Container\AdminSection\Controllers\System\TagController;
use App\Http\Container\AdminSection\Controllers\System\UserTagController;
use App\Http\Container\AdminSection\Controllers\System\VersionController;
Route::apiResource('tags', TagController::class)->except('show');
Route::apiResource('versions', VersionController::class)->except('show');
Route::apiResource('banners', BannerController::class)->except('show');
Route::apiResource('reports', ReportController::class)->only(['index', 'update']);
Route::put('banners/{banner}/change-status', [BannerController::class, 'changeStatus'])->whereNumber('banner');
Route::apiResource('user_tags', UserTagController::class)->except('show')->middleware('emptyToNull');
Route::apiResource('materials', MaterialController::class)->except('show');
Route::apiResource('roles', RoleController::class)->except('show');
Route::put('roles/{role}/change-status', [RoleController::class, 'changeStatus'])->whereNumber('role');
Route::put('roles/{role}/change-permission', [RoleController::class, 'changePermission'])->whereNumber('role');
Route::apiResource('permissions', PermissionController::class)->only('index');
Route::apiResource('notification', NotificationController::class)->except('destroy');
Route::get('notification/{notification}/users', [NotificationController::class, 'user'])->whereNumber('notification');
Route::put('notification/{notification}/send', [NotificationController::class, 'send'])->whereNumber('notification');
Route::put('notification/{notification}/cancel', [NotificationController::class, 'cancel'])->whereNumber('notification');
Route::put('notification/{notification}/rollback', [NotificationController::class, 'rollback'])->whereNumber('notification');
Route::apiResource('configs', ConfigController::class);
Route::put('configs/{config}/change-status', [ConfigController::class, 'changeStatus'])->whereNumber('config');
Route::prefix('broker')->group(function () {
Route::apiResource('push-configs', PushConfigController::class)->except('show');
Route::apiResource('user-configs', UserConfigController::class);
Route::post('user-configs/{userConfig}/level', [UserConfigController::class, 'storeLevelRecord'])->whereNumber('userConfig');
Route::post('user-configs/upload', [UserConfigController::class, 'upload']);
Route::get('push-match-records', [PushMatchRecordController::class, 'index']);
Route::post('push-match-records/{record}/send', [PushMatchRecordController::class, 'send'])->whereNumber('record');
Route::post('push-match-records/{record}/rollback', [PushMatchRecordController::class, 'rollback'])->whereNumber('record');
Route::get('push-level-records', [PushLevelRecordController::class, 'index']);
Route::put('push-level-records/{record}', [PushLevelRecordController::class, 'update'])->whereNumber('record');
Route::delete('push-level-records/{record}', [PushLevelRecordController::class, 'destroy'])->whereNumber('record');
Route::get('push-level-records/{record}/children', [PushLevelRecordController::class, 'children'])->whereNumber('record');
Route::post('push-level-records/{record}/send', [PushLevelRecordController::class, 'send'])->whereNumber('record');
Route::post('push-level-records/{record}/rollback', [PushLevelRecordController::class, 'rollback'])->whereNumber('record');
});
Route::get('operation-logs', OperationLogController::class);