bookinventory/resources/views/index.blade.php

21 lines
568 B
PHP

@extends('layouts.main')
@section('content')
<table class="table table-compact">
<thead>
<th>Name</th>
<th>Authors</th>
<th>Location</th>
</thead>
<tbody>
@foreach ($rows as $row)
<tr>
<td>{{ $row->name }}</td>
<td>{{ $row->authors->pluck('name')->join(', ') }}</td>
<td>{{ $row->location->name }}</td>
</tr>
@endforeach
</tbody>
</table>
{{ $rows->links() }}
@endsection