31 lines
1.1 KiB
PHP
31 lines
1.1 KiB
PHP
<x-layout>
|
|
<div class="container">
|
|
<table class="table">
|
|
<tr>
|
|
<th>Titel</th>
|
|
<th>Bruger</th>
|
|
<th>Status</th>
|
|
<th>Rediger</th>
|
|
<th>Slet</th>
|
|
</tr>
|
|
@foreach($posts as $post)
|
|
<tr>
|
|
<td>{{ $post->title }}</td>
|
|
<td>{{ $post->user->username }}</td>
|
|
<td>{{ $post->status->name }}</td>
|
|
<td>
|
|
<a href="/admin/posts/{{ $post->id }}/edit"><ion-icon name="pencil-outline"></ion-icon></a>
|
|
</td>
|
|
<td>
|
|
<form action="/admin/posts/{{ $post->id }}/" method="post">
|
|
@method('delete')
|
|
@csrf
|
|
<button type="submit"><ion-icon name="trash-outline"></ion-icon></button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</table>
|
|
</div>
|
|
</x-layout>
|