Jérôme
Jérôme
FFilament
Created by Jérôme on 8/23/2024 in #❓┊help
add action on infolist/view on relation manager?
Yeah you're right @Marco It's working great Thx a lot!
return $infolist
->schema([
Actions::make([
Action::make('markAsRead')
->label('Marquer comme lu')
->icon('heroicon-s-document')
->hidden(fn (Event $event): bool => !$event->is_new)
->action(function (Event $event) {
$event->is_new = false;
$event->save();
}),

Action::make('maskAsUnread')
->label('Marquer comme non lu')
->icon('heroicon-o-document')
->hidden(fn (Event $event): bool => $event->is_new)
->action(function (Event $event) {
$event->is_new = true;
$event->save();
}),
]),
Group::make()
->schema([
...
])->columnSpanFull(),
]);
}
return $infolist
->schema([
Actions::make([
Action::make('markAsRead')
->label('Marquer comme lu')
->icon('heroicon-s-document')
->hidden(fn (Event $event): bool => !$event->is_new)
->action(function (Event $event) {
$event->is_new = false;
$event->save();
}),

Action::make('maskAsUnread')
->label('Marquer comme non lu')
->icon('heroicon-o-document')
->hidden(fn (Event $event): bool => $event->is_new)
->action(function (Event $event) {
$event->is_new = true;
$event->save();
}),
]),
Group::make()
->schema([
...
])->columnSpanFull(),
]);
}
5 replies
FFilament
Created by Jérôme on 8/23/2024 in #❓┊help
add action on infolist/view on relation manager?
oh really? Let me try
5 replies
FFilament
Created by Jérôme on 8/15/2024 in #❓┊help
Builder: block open by default?
it's perfect thx a lot. It works with both but the right one is data (or else it works but is not right in database): ->default([ [ 'type' => 'image', 'data' => []], ]),
6 replies
FFilament
Created by Jérôme on 5/10/2024 in #❓┊help
Change badge color on NavigationItem in AdminPanelProdiver
ah yes it works at at the param of badge... thx @Vp 🙂
6 replies