bookinventory/resources/views/index.blade.php

21 lines
568 B
PHP
Raw Normal View History

2020-12-26 10:46:23 +00:00
@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