resources/views/livewire/datatable.blade.php: show restore action if $trashed is set.
This commit is contained in:
parent
b4c46d447b
commit
0110e8e8e7
1 changed files with 7 additions and 1 deletions
|
|
@ -34,7 +34,7 @@
|
|||
<td class="border px-4 py-2">{{ Arr::get($item, $key) }}</td>
|
||||
@endforeach
|
||||
|
||||
@if ($route_edit || $route_delete)
|
||||
@if (!$trashed && ($route_edit || $route_delete))
|
||||
<td class="border px-4 py-2">
|
||||
@if($route_edit)
|
||||
<a href="{{ route($route_edit, [ $item ]) }}">
|
||||
|
|
@ -50,6 +50,12 @@
|
|||
</x-ignite-form>
|
||||
@endif
|
||||
</td>
|
||||
@elseif ($trashed && $route_restore)
|
||||
<td class="border px-4 py-2">
|
||||
<a href="{{ route($route_restore, [ $item ]) }}">
|
||||
<x-icon name="heroicon-o-refresh" class="inline-block w-6 text-blue-500"/>
|
||||
</a>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
|
|
|
|||
Reference in a new issue