mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-24 04:14:57 +00:00
Bruno Fontes
ea3ffaad39
Now it shows the username of who is using an item. Item db field 'usedBy' was renamed to 'used_by' to keep consistence.
39 lines
1.3 KiB
PHP
39 lines
1.3 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('content')
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8">
|
|
<div class="card">
|
|
<div class="card-header"><h3>Your items</h3></div>
|
|
|
|
<div class="card-body">
|
|
@if (session('status'))
|
|
<div class="alert alert-success" role="alert">
|
|
{{ session('status') }}
|
|
</div>
|
|
@endif
|
|
|
|
@forelse ($items as $item)
|
|
@if (!$loop->first)
|
|
<hr class="m-3">
|
|
@endif
|
|
<div class="my-4 p-2">
|
|
<strong>{{$item->name}}</strong> ({{$item->product->name}})
|
|
|
|
@if ($item->used_by)
|
|
@include('home.usedItem')
|
|
@else
|
|
@include('home.unusedItem')
|
|
@endif
|
|
</div>
|
|
@empty
|
|
<p>There are no items shared with you yet. <a href="/product">Share an item!</a></p>
|
|
@endforelse
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|