質問編集履歴

1

表示させたいviewを追加

2021/07/22 09:28

投稿

MasahiroTakata
MasahiroTakata

スコア2

test CHANGED
File without changes
test CHANGED
@@ -139,3 +139,57 @@
139
139
  }
140
140
 
141
141
  ```
142
+
143
+ 今回表示させたいview’(categoryProduct.blade.php)
144
+
145
+ ```ここに言語を入力
146
+
147
+ @extends('layouts.default')
148
+
149
+ @section('title', 'Shopping Review')
150
+
151
+ @section('css')
152
+
153
+ <link rel="stylesheet" href="{{ asset('css/imagehover.min.css') }}">
154
+
155
+ @endsection
156
+
157
+ @section('content')
158
+
159
+ @include('submenu', ['categorys' => $submenu])
160
+
161
+ @if (isset ($products))
162
+
163
+ <div class = 'content'>
164
+
165
+ @foreach ($products as $product)
166
+
167
+ <figure class="imghvr-fade">
168
+
169
+ <img src="{{ $product->image }}" class="productImage">
170
+
171
+ <figcaption>
172
+
173
+ カテゴリー:{{ $product->category->name }}<br/><br/>
174
+
175
+ 商品名:{{ $product->name }}<br/><br/>
176
+
177
+ 価格:{{ $product->price }}円
178
+
179
+ </figcaption>
180
+
181
+ <a href="{{ action('ShoppingController@show', $product->id) }}"></a>
182
+
183
+ </figure>
184
+
185
+ @endforeach
186
+
187
+ {{ $products->links() }}
188
+
189
+ </div>
190
+
191
+ @endif
192
+
193
+ @endsection
194
+
195
+ ```