feat: 更新 .env.example 文件,新增彩票业务配置与 Redis、邮件、队列等环境变量,优化开发环境设置

This commit is contained in:
2026-05-08 17:26:01 +08:00
parent 8cce1778b9
commit 85e57782cc
12 changed files with 663 additions and 54 deletions

View File

@@ -8,47 +8,41 @@ use App\Http\Controllers\Api\V1\Wallet\WalletBalanceController;
use Illuminate\Support\Facades\Route;
/*
| Laravel bootstrap 为本文件自动加前缀 `api` + 中间件组 `api`,故实际 URL
| /api/v1/health
| /api/v1/player/...
| /api/v1/wallet/...
| /api/v1/admin/...
| Laravel 为本文件自动加前缀 `api`,此处再写 `v1`,故完整路径形如 `/api/v1/health`
*/
Route::prefix('v1')->group(function (): void {
// 探活:无鉴权
// 名称:服务健康检查
Route::get('health', HealthController::class)->name('api.v1.health');
// 玩家前缀下:仅 ping 公开me 与 wallet/* 共用 lottery.player见下方大组
Route::prefix('player')
->name('api.v1.player.')
->group(function (): void {
// 名称:玩家端连通性探测
Route::get('ping', PlayerPingController::class)->name('ping');
});
/*
| 已登录玩家PRD 把路径拆成 `/v1/player/*` `/v1/wallet/*`,这里用同一中间件块避免重复写。
| 勿把 wallet 挂到 player 前缀下,否则会变成 /api/v1/player/wallet/...,与 PRD §10.1.1 不一致。
*/
Route::middleware('lottery.player')->group(function (): void {
Route::prefix('player')
->name('api.v1.player.')
->group(function (): void {
// 名称:当前登录玩家信息
Route::get('me', MeController::class)->name('me');
});
Route::prefix('wallet')
->name('api.v1.wallet.')
->group(function (): void {
// 名称:彩票钱包余额查询
Route::get('balance', WalletBalanceController::class)->name('balance');
});
});
// 后台 APIlottery.admin 内预留 Sanctum / RBAC
Route::middleware('lottery.admin')
->prefix('admin')
->name('api.v1.admin.')
->group(function (): void {
// 名称:后台接口连通性探测
Route::get('ping', AdminPingController::class)->name('ping');
});
});