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(), ]); }
->default([ [ 'type' => 'image', 'data' => []], ]),