diff --git a/resources/views/product/buttons.blade.php b/resources/views/product/buttons.blade.php new file mode 100644 index 0000000..762700a --- /dev/null +++ b/resources/views/product/buttons.blade.php @@ -0,0 +1,22 @@ + +
+ + + + @if ($product->user_id == \Auth::id()) +
+ @method('PATCH') + +
+ @endif + + + +
+ @method('DELETE') + +
+ + +
+
\ No newline at end of file diff --git a/resources/views/product/show.blade.php b/resources/views/product/show.blade.php index b1d43df..473bc00 100644 --- a/resources/views/product/show.blade.php +++ b/resources/views/product/show.blade.php @@ -19,7 +19,7 @@
Product: {{$product['name']}} - Edit - Delete + @include ('product.buttons')
@@ -28,6 +28,7 @@
@endif + Items: