Files
hyperf_service/app/Request/Admin/AuthRequest.php
2024-10-27 18:08:06 +08:00

40 lines
665 B
PHP

<?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',
];
}