質問編集履歴
4
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -140,7 +140,11 @@
|
|
140
140
|
|
141
141
|
|
142
142
|
|
143
|
-
```
|
143
|
+
```
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
ファイル名index.blade.php
|
144
148
|
|
145
149
|
<div class="holder">
|
146
150
|
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -137,3 +137,59 @@
|
|
137
137
|
|
138
138
|
|
139
139
|
```
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
```ここに言語を入力
|
144
|
+
|
145
|
+
<div class="holder">
|
146
|
+
|
147
|
+
<div class="items-images">
|
148
|
+
|
149
|
+
<ul class="images">
|
150
|
+
|
151
|
+
@if(count($posts) > 0)
|
152
|
+
|
153
|
+
@foreach($posts as $post)
|
154
|
+
|
155
|
+
<li class="image">
|
156
|
+
|
157
|
+
<div class="product">
|
158
|
+
|
159
|
+
<a class="product-image" href="post/show/{{ $post->id }}">
|
160
|
+
|
161
|
+
<div class="product-card">
|
162
|
+
|
163
|
+
<span class="product-price">{{ $post->brand }}</span>
|
164
|
+
|
165
|
+
<img class="product-image-size" src="{ asset (/storage/{{$post->image}}) }" alt="商品写真">
|
166
|
+
|
167
|
+
<div class="product-description">
|
168
|
+
|
169
|
+
<span>{{ $post->name }}</span>
|
170
|
+
|
171
|
+
</div>
|
172
|
+
|
173
|
+
</div>
|
174
|
+
|
175
|
+
</a>
|
176
|
+
|
177
|
+
</div>
|
178
|
+
|
179
|
+
</li>
|
180
|
+
|
181
|
+
@endforeach
|
182
|
+
|
183
|
+
@else
|
184
|
+
|
185
|
+
<div>投稿記事がありません</div>
|
186
|
+
|
187
|
+
@endif
|
188
|
+
|
189
|
+
</ul>
|
190
|
+
|
191
|
+
</div>
|
192
|
+
|
193
|
+
</div>
|
194
|
+
|
195
|
+
```
|
2
コードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -122,7 +122,7 @@
|
|
122
122
|
|
123
123
|
$post->brand = $request->brand;
|
124
124
|
|
125
|
-
$post->image = $request->image;
|
125
|
+
$post->image = $request->image->store('public');
|
126
126
|
|
127
127
|
$post->user_id = $request->user()->id;
|
128
128
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,7 +10,9 @@
|
|
10
10
|
|
11
11
|
|
12
12
|
|
13
|
-
PostController.php
|
13
|
+
PostController.php
|
14
|
+
|
15
|
+
public function create(Request $request)のcreateがうまく行かずにThe image must be a file.となります、ご教授お願いいたします。
|
14
16
|
|
15
17
|
|
16
18
|
|