mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 16:00:54 -03:00
Imrpoving Item, Product and Users
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
{{ csrf_field() }}
|
||||
<div class="col"><label for="product">Add Item: </label></div>
|
||||
<div class="col-6"><input type="text" class="form-control" name="item" id="item" placeholder="One Hundred Years of Solitude" required></div>
|
||||
<input type="hidden" name="product_id" id="product_id" value="{{ $product['id'] }}" required>
|
||||
<div class="col"><button type="submit" class="btn btn-primary">Insert</button></div>
|
||||
</div>
|
||||
@include ('layouts.errors')
|
||||
@@ -28,8 +29,8 @@
|
||||
@endif
|
||||
|
||||
<ul>
|
||||
@forelse ($items as $item)
|
||||
<li><a href="/product/{{$item['id']}}">{{$item['name']}}</a></li>
|
||||
@forelse ($product->items as $item)
|
||||
<li><a href="/item/{{ $item->id }}">{{ $item->name }}</a></li>
|
||||
@empty
|
||||
<p>There are no items yet. Include one with the form above.</p>
|
||||
@endforelse
|
||||
|
||||
Reference in New Issue
Block a user