Skip to content

Instantly share code, notes, and snippets.

@aryadiahmad4689
Created December 23, 2022 16:28
Show Gist options
  • Save aryadiahmad4689/6fc45ec65b9d1e784c27c6db89566e5a to your computer and use it in GitHub Desktop.
Save aryadiahmad4689/6fc45ec65b9d1e784c27c6db89566e5a to your computer and use it in GitHub Desktop.
<div>
{{-- Stop trying to control. --}}
@if($updateMode)
@include('livewire.update')
@else
@include('livewire.create')
@endif
<table class="table table-bordered mt-5">
<thead>
<tr>
<th>No.</th>
<th>Title</th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach($posts as $value)
<tr>
<td>{{ $value->id }}</td>
<td>{{ $value->title }}</td>
<td>{{ $value->description }}</td>
<td>
<button wire:click="edit({{ $value->id }})" class="btn btn-primary btn-sm">Edit</button>
<button wire:click="delete({{ $value->id }})" class="btn btn-danger btn-sm">Delete</button>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment