我正在尝试从连线中触发一个livewire函数:单击可数据数组。
此系统运行良好,但仅适用于第一个datatable页面。在第二页或更高版本中没有触发任何内容。
这是我的代码:
event.php:
public function showEvent($eventId)
{
return redirect()->route('events.show', [$eventId]);
}event.blade.php:
<table class="table align-items-center mb-0 responsive" id="event-table" wire:ignore>
<thead>
<tr>
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">
Nom
</th>
</tr>
</thead>
<tbody>
@foreach ($events as $event)
<tr class="px-3" wire:key="{{ $event->id }}">
<td class="ps-2 ps-md-4" data-label="Nom" wire:click="showEvent({{ $event->id }})">
</tr>
@endforeach
</tbody>
</table>有什么建议吗?谢谢
发布于 2022-01-13 09:02:00
为什么你用生活线来做这个润肤液。
,如果对任何页面进行重定向:
用标签重定向,
如果在当前页面中显示部分视图:
showEvent方法中的返回视图。
发布于 2022-01-13 13:59:30
尝试删除电线:忽略和wire:key="{{ $event->id }“,我没有看到任何分页
https://stackoverflow.com/questions/70693498
复制相似问题