30 lines
819 B
PHP
30 lines
819 B
PHP
<x-layout>
|
|
<x-slot:title>Categories</x-slot>
|
|
|
|
<div class="sunken-panel">
|
|
<table class="interactive">
|
|
<thead>
|
|
<tr>
|
|
<th>Category</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody x-data="{ hovered: null }" x-on:mouseleave="hovered = null">
|
|
@foreach ($categories as $category)
|
|
<tr
|
|
id="{{ $category->id }}"
|
|
x-on:mouseenter="hovered = $event.target.id"
|
|
x-bind:class="{ 'highlighted': hovered === $el.id }"
|
|
>
|
|
<td>{{ $category->name }}</td>
|
|
<td>
|
|
<a href="{{ route('categories.show', $category->id) }}">View</a>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<a href="{{ route('categories.create') }}">New</a>
|
|
</x-layout>
|