bookinventory/resources/views/locations/show.blade.php

25 lines
814 B
PHP
Raw Permalink Normal View History

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