|
@@ -38,13 +38,7 @@ class ProductRequest extends FormRequest |
|
@@ -38,13 +38,7 @@ class ProductRequest extends FormRequest |
|
38
|
return [
|
38
|
return [
|
|
39
|
'title' => 'required|max:200',
|
39
|
'title' => 'required|max:200',
|
|
40
|
'route' => 'required|max:200',
|
40
|
'route' => 'required|max:200',
|
|
41
|
- 'gallery' => ['required', 'array', function ($attribute, $value, $fail) {
|
|
|
|
42
|
- foreach ($value as $v) {
|
|
|
|
43
|
- if (empty($v['url'])) {
|
|
|
|
44
|
- $fail('图片链接不能为空');
|
|
|
|
45
|
- }
|
|
|
|
46
|
- }
|
|
|
|
47
|
- }],
|
41
|
+ 'gallery' => ['required', 'array'],
|
|
48
|
'icon' => 'required|array',
|
42
|
'icon' => 'required|array',
|
|
49
|
'attrs' => ['array', function ($attribute, $value, $fail) {
|
43
|
'attrs' => ['array', function ($attribute, $value, $fail) {
|
|
50
|
foreach ($value as $v) {
|
44
|
foreach ($value as $v) {
|