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
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
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. π«
You can via
modalActions()
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
Oh wait sorry. The last answer was for actions π
π€¦ββοΈ
Or wait: this is related to the action modal now, right?
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
->modalActions([])
Thank you so much!!!! I love filament.
Okay then I was right with the action and my answer was valid π
I use modalActions() like this: ->modalActions(fn ($record) => view('livewire.view-voucher', ['record' => $record])). π€£ and the correct way was like this:
Thank you Dennis!!!!