GroupInviteRequest.php 670 Bytes
<?php


namespace App\Http\Container\AppSection\Requests;


use Hikoon\LaravelApi\Support\ApiRequest;

class GroupInviteRequest extends ApiRequest
{
    public function rules(): array
    {
        return [
            'user_id' => 'required|int',
            'type' => 'required|integer|between:1,2'
        ];
    }

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