HandleInviteRequest.php
896 Bytes
<?php
namespace App\Http\Container\AppSection\Requests;
use Hikoon\LaravelApi\Support\ApiRequest;
class HandleInviteRequest extends ApiRequest
{
public function rules(): array
{
return [
'user_id' => 'required|int',
'type' => 'required|integer|between:1,2',
'status'=>'required|integer|between:2,3',
];
}
public function messages(): array
{
return [
'user_id.required' => 'user_id为必填项。',
'user_id.int' => 'user_id为整数类型',
'type.required' => 'type为必填项。',
'type.integer' => 'type为整数类型',
'type.between' => 'type范围在1-2',
'status.required' => 'status为必填项。',
'status.integer' => 'status为整数类型',
'status.between' => 'status范围在2-3'
];
}
}