forked from kuaifan/dootask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.php
54 lines (49 loc) · 2.15 KB
/
web.php
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
<?php
use App\Http\Controllers\Api\DialogController;
use App\Http\Controllers\Api\FileController;
use App\Http\Controllers\Api\ProjectController;
use App\Http\Controllers\Api\SystemController;
use App\Http\Controllers\Api\UsersController;
use App\Http\Controllers\IndexController;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
/**
* 接口
*/
Route::prefix('api')->middleware(['webapi'])->group(function () {
// 会员
Route::any('users/{method}', UsersController::class);
Route::any('users/{method}/{action}', UsersController::class);
// 项目
Route::any('project/{method}', ProjectController::class);
Route::any('project/{method}/{action}', ProjectController::class);
// 系统
Route::any('system/{method}', SystemController::class);
Route::any('system/{method}/{action}', SystemController::class);
// 对话
Route::any('dialog/{method}', DialogController::class);
Route::any('dialog/{method}/{action}', DialogController::class);
// 文件
Route::any('file/{method}', FileController::class);
Route::any('file/{method}/{action}', FileController::class);
});
/**
* 页面
*/
Route::middleware(['webapi'])->group(function () {
Route::any('/', IndexController::class);
Route::any('/{method}', IndexController::class);
Route::any('/{method}/{action}', IndexController::class);
Route::any('/{method}/{action}/{child}', IndexController::class);
Route::any('/{method}/{action}/{child}/{n}', IndexController::class);
Route::any('/{method}/{action}/{child}/{n}/{c}', IndexController::class);
});