Refactoring product view

Creating a separate buttons file to edit or delete a product
This commit is contained in:
2018-09-12 21:28:39 -03:00
parent 9debf5548c
commit 73e8b5e4b4
2 changed files with 24 additions and 1 deletions

View File

@@ -19,7 +19,7 @@
<div class="card mt-4">
<div class="card-header">
Product: <strong>{{$product['name']}}</strong>
<span class="d-inline-block text-truncat float-right">Edit - Delete</span>
@include ('product.buttons')
</div>
<div class="card-body">
@@ -28,6 +28,7 @@
</div>
@endif
<strong>Items:</strong>
<ul>
@forelse ($product->items as $item)
<li><a href="/item/{{ $item->id }}">{{ $item->name }}</a></li>