質問編集履歴
1
表示させたいviewを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -68,4 +68,31 @@
|
|
68
68
|
'submenu' => Category::all(),
|
69
69
|
]);
|
70
70
|
}
|
71
|
+
```
|
72
|
+
今回表示させたいview’(categoryProduct.blade.php)
|
73
|
+
```ここに言語を入力
|
74
|
+
@extends('layouts.default')
|
75
|
+
@section('title', 'Shopping Review')
|
76
|
+
@section('css')
|
77
|
+
<link rel="stylesheet" href="{{ asset('css/imagehover.min.css') }}">
|
78
|
+
@endsection
|
79
|
+
@section('content')
|
80
|
+
@include('submenu', ['categorys' => $submenu])
|
81
|
+
@if (isset ($products))
|
82
|
+
<div class = 'content'>
|
83
|
+
@foreach ($products as $product)
|
84
|
+
<figure class="imghvr-fade">
|
85
|
+
<img src="{{ $product->image }}" class="productImage">
|
86
|
+
<figcaption>
|
87
|
+
カテゴリー:{{ $product->category->name }}<br/><br/>
|
88
|
+
商品名:{{ $product->name }}<br/><br/>
|
89
|
+
価格:{{ $product->price }}円
|
90
|
+
</figcaption>
|
91
|
+
<a href="{{ action('ShoppingController@show', $product->id) }}"></a>
|
92
|
+
</figure>
|
93
|
+
@endforeach
|
94
|
+
{{ $products->links() }}
|
95
|
+
</div>
|
96
|
+
@endif
|
97
|
+
@endsection
|
71
98
|
```
|