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
when i use $this-session it shows $this cannot be used when in object context
@Dan Mason
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 π
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 π¬