feat: auth

This commit is contained in:
2024-10-27 18:08:06 +08:00
parent 4b12825a9a
commit 10037e11fd
9 changed files with 428 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace App\Request\Admin;
use Hyperf\Validation\Request\FormRequest;
class AuthRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'role_id' => 'required|integer',
];
}
public function messages(): array
{
return [
''
];
}
protected array $scenes = [
'role_info' => 'role_id',
];
}