refactor:拆分 API 路由与请求校验,统一 final 类和代码风格
This commit is contained in:
30
app/Http/Requests/Admin/AdminPlayerTicketItemsRequest.php
Normal file
30
app/Http/Requests/Admin/AdminPlayerTicketItemsRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
/**
|
||||
* 管理员查看玩家注单列表请求。
|
||||
*
|
||||
* @see AdminPlayerTicketItemsIndexController
|
||||
*/
|
||||
final class AdminPlayerTicketItemsRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array<int, mixed>>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'page' => ['sometimes', 'integer', 'min:1'],
|
||||
'per_page' => ['sometimes', 'integer', 'min:1', 'max:50'],
|
||||
'draw_no' => ['sometimes', 'nullable', 'string', 'max:32'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user