feat: auth
This commit is contained in:
39
app/Request/Admin/AuthRequest.php
Normal file
39
app/Request/Admin/AuthRequest.php
Normal 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',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user