Zhartaunik
Zhartaunik
FFilament
Created by Zhartaunik on 5/12/2024 in #❓┊help
Table custom query, where from request path.
Thank you, it works! For the history:
public int $eventId;

public function mount(): void
{
$this->eventId = (int) request()->route()->parameter('record');
}

public function table(Table $table): Table
{
return $table
->query(Member::query()
->where('event_id', $this->eventId)
)
//...
public int $eventId;

public function mount(): void
{
$this->eventId = (int) request()->route()->parameter('record');
}

public function table(Table $table): Table
{
return $table
->query(Member::query()
->where('event_id', $this->eventId)
)
//...
6 replies