mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 07:50:54 -03:00
Creating relationships between users/items/products
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
|
||||
|
||||
<!-- EDIT BUTTON -->
|
||||
@if ($item[0]->admin_id == \Auth::id())
|
||||
<form action="/item/{{$item[0]->id}}" method="POST">
|
||||
@if ($item->product->user_id == \Auth::id())
|
||||
<form action="/item/{{$item->id}}" method="POST">
|
||||
@method('PATCH')
|
||||
<button type="button" class="btn-sm btn-secondary mr-1">Edit</button>
|
||||
</form>
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
<!-- DELETE BUTTON -->
|
||||
<form action="/item/{{$item[0]->id}}" method="POST">
|
||||
<form action="/item/{{$item->id}}" method="POST">
|
||||
@method('DELETE')
|
||||
<button type="button" class="btn-sm btn-danger">Delete</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user