bookinventory/resources/views/index.blade.php

25 lines
769 B
PHP
Raw Permalink Normal View History

2020-12-26 10:46:23 +00:00
@extends('layouts.main')
@section('content')
2020-12-27 00:34:07 +00:00
<table class="table table-compact table-striped">
2020-12-26 10:46:23 +00:00
<thead>
<th>Name</th>
<th>Authors</th>
<th>Location</th>
2020-12-27 00:34:07 +00:00
<th>Actions</th>
2020-12-26 10:46:23 +00:00
</thead>
<tbody>
@foreach ($rows as $row)
<tr>
<td>{{ $row->name }}</td>
<td>{{ $row->authors->pluck('name')->join(', ') }}</td>
<td>{{ $row->location->name }}</td>
2020-12-27 00:34:07 +00:00
<td>
<a class="btn btn-info btn-sm" href="{{ route('books.show', $row->id) }}">View</a>
</td>
2020-12-26 10:46:23 +00:00
</tr>
@endforeach
</tbody>
</table>
{{ $rows->links() }}
@endsection