HideOrIstopRequest.php
805 Bytes
<?php
namespace App\Http\Container\AppSection\Requests;
use Hikoon\LaravelApi\Support\ApiRequest;
class HideOrIstopRequest extends ApiRequest
{
public function rules(): array
{
return [
'id' => 'required|int',
'field' => 'required|string',
'status' => 'required|integer|between:0,1',
];
}
public function messages(): array
{
return [
'id.required' => 'id为必填项。',
'id.int' => 'id数字类型',
'field.required' => 'field为必填项。',
'field.string' => 'field字符串类型',
'status.required' => 'status为必填项',
'status.integer' => 'status为数字类型',
'status.between' => 'status在0-1之间'
];
}
}