F
Filament6mo ago
dyo

Pass data from one method to the other

can you help me how to pass a variable from 1 method to another? i've code something like this
->modalSubheading(function ($record) {
$data = Setoran::where('status', 'Unconfirm')
->where('dana', $record->dana)->first();
//
})
->action(function ($record): void {
$setoran_id = ??;
//
})
->modalButton(function():void {
$setoran_id = ??;
//
})
->modalSubheading(function ($record) {
$data = Setoran::where('status', 'Unconfirm')
->where('dana', $record->dana)->first();
//
})
->action(function ($record): void {
$setoran_id = ??;
//
})
->modalButton(function():void {
$setoran_id = ??;
//
})
i want to use $data from subheading in action and modalButton method..
0 Replies
No replies yetBe the first to reply to this messageJoin