F
Filamentβ€’16mo ago
Ander

Customizing notifications doesn't work

Hello, could you please help me, I would like to be able to show my voucher in a different way, I don't want it in a "ViewAction" because I don't know how to add custom buttons and remove the "close" button, so I hope to show it in a custom notification but no It shows me nothing when pressing the "voucher 2" action. In #1 I did it with "ViewAction", but I can't remove the "close" button, nor can I place a button to do any action I want. That is why in #2 I tried to do it with a personalized notification to show the voucher of the first image. I just put a text to know if it worked but the idea is to show the voucher that is seen in the first image. I don't know if I'm doing something wrong because it doesn't show me any notification. if I send it a normal notification like "Notification::make() ->title('Saved successfully') ->success() ->send(); " It does show it but my personalized notification doesn't. I did what the documentation says.
13 Replies
Dan Harrin
Dan Harrinβ€’16mo ago
Notification::configureUsing() needs to be called from a service provider or something atm you've called it from a place where it will only be used temporarily
Ander
Anderβ€’15mo ago
I couldn't do that, I didn't know how. Is there a way to remove the "Close" button and place another one if you wanted to. 😫
Dennis Koch
Dennis Kochβ€’15mo ago
You can via modalActions()
Ander
Anderβ€’15mo ago
Thanks, but what I want is to remove the "close" button and place another button if I wanted it that way, for example, "print" button and if not leave it without a button, it only shows me the view as such
Dennis Koch
Dennis Kochβ€’15mo ago
Oh wait sorry. The last answer was for actions πŸ˜…πŸ€¦β€β™‚οΈ Or wait: this is related to the action modal now, right?
Ander
Anderβ€’15mo ago
Don't worry and I'm sorry if I don't explain myself well, I don't know much English so I use Google translator. 🀣 I just want to remove or hide the "close" button from the modal
Ander
Anderβ€’15mo ago
Ander
Anderβ€’15mo ago
Dan Harrin
Dan Harrinβ€’15mo ago
->modalActions([])
Ander
Anderβ€’15mo ago
Thank you so much!!!! I love filament.
Dennis Koch
Dennis Kochβ€’15mo ago
Okay then I was right with the action and my answer was valid πŸ˜‚
Ander
Anderβ€’15mo ago
I use modalActions() like this: ->modalActions(fn ($record) => view('livewire.view-voucher', ['record' => $record])). 🀣 and the correct way was like this:
Ander
Anderβ€’15mo ago
Thank you Dennis!!!!
Want results from more Discord servers?
Add your server
More Posts