F
Filamentβ€’6mo ago
ashar

passing dynamic data

i hace a booking resource in which i am calling a component. public \App\Models\Session $session; public function __construct(BookingService $bookingService) { $this->bookingService = $bookingService; } public function mount($session): void { $this->session = $session; } component action ->actions([ Action::make('viewItems')->view('filament.actions.view-items', [ 'sessionId' => 1, 'style' => 'link', ])->hidden( fn($record) => (!$record->isActive() $record->isCancelled() $record->isCompleted()) ), how can i pass this sessionId dynamic ?? right now its static
4 Replies
ashar
asharβ€’6mo ago
when i use $this-session it shows $this cannot be used when in object context @Dan Mason
m450
m450β€’6mo ago
Dont randomly @ people please. Someone will help when they can. Also not sure if you intended to @ Dan Harrin as I am not that active on here πŸ˜„
ashar
asharβ€’6mo ago
opps sorry . Actually i posted it in the morning no one answered. still i was stuck so found you online so mentioned you guessing if you might help 😬
Tippin
Tippinβ€’6mo ago
DanSureCan