ProjectEdtiorRequest.php
900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
namespace App\Http\Container\AppSection\Requests;
use Hikoon\LaravelApi\Support\ApiRequest;
class ProjectEdtiorRequest extends ApiRequest
{
public function rules(): array
{
return [
'id' => 'required|int',
'cover' => 'string',
'name' => 'string',
'master_id' => 'int',
'head_cover' => 'string',
'intro' => 'string',
];
}
public function messages(): array
{
return [
'id.required' => 'id为必填项。',
'id.int' => 'id数字类型',
'cover.string' => 'cover为字符串类型',
'name.string' => 'name为字符串类型',
'master_id.int' => 'master_id数字类型',
'head_cover.string' => 'head_cover为字符串类型',
'intro.string' => 'intro为字符串类型',
];
}
}