質問編集履歴
4
blade修正2
test
CHANGED
File without changes
|
test
CHANGED
@@ -102,6 +102,22 @@
|
|
102
102
|
|
103
103
|
</div>
|
104
104
|
|
105
|
+
<div class="d-md-none">
|
106
|
+
|
107
|
+
<span class="item-image-form image-picker">
|
108
|
+
|
109
|
+
<input type="file" name="item-image" class="d-none" accept="image/png,image/jpeg,image/gif" id="item-image" />
|
110
|
+
|
111
|
+
<label for="item-image" class="d-inline-block" role="button">
|
112
|
+
|
113
|
+
<img src="/images/item-image-default.png" style="object-fit: cover; width: 100%; height: 20%;">
|
114
|
+
|
115
|
+
</label>
|
116
|
+
|
117
|
+
</span>
|
118
|
+
|
119
|
+
</div>
|
120
|
+
|
105
121
|
<div class="form-group mb-0 mt-3 w-50 offset-3">
|
106
122
|
|
107
123
|
<button type="submit" class="btn btn-block btn-primary">
|
3
SellRequest追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -122,6 +122,32 @@
|
|
122
122
|
|
123
123
|
```
|
124
124
|
|
125
|
+
```SellRequest
|
126
|
+
|
127
|
+
public function rules()
|
128
|
+
|
129
|
+
{
|
130
|
+
|
131
|
+
return [
|
132
|
+
|
133
|
+
'item-image' => ['file', 'image'],
|
134
|
+
|
135
|
+
'name' => ['required', 'string', 'max:255'],
|
136
|
+
|
137
|
+
'description' => ['required', 'string', 'max:2000'],
|
138
|
+
|
139
|
+
'category' => ['required', 'integer'],
|
140
|
+
|
141
|
+
'condition' => ['required', 'integer'],
|
142
|
+
|
143
|
+
'price' => ['required', 'integer', 'min:100', 'max:9999999'],
|
144
|
+
|
145
|
+
];
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
```
|
150
|
+
|
125
151
|
|
126
152
|
|
127
153
|
|
2
blade修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -102,6 +102,16 @@
|
|
102
102
|
|
103
103
|
</div>
|
104
104
|
|
105
|
+
<div class="form-group mb-0 mt-3 w-50 offset-3">
|
106
|
+
|
107
|
+
<button type="submit" class="btn btn-block btn-primary">
|
108
|
+
|
109
|
+
出品する
|
110
|
+
|
111
|
+
</button>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
105
115
|
</from>
|
106
116
|
|
107
117
|
```
|
1
コントローラーのメソッド変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
```
|
30
30
|
|
31
|
-
public function
|
31
|
+
public function store(SellRequest $request, Item $item)
|
32
32
|
|
33
33
|
{
|
34
34
|
|