© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
5 replies
josecaubivasconcelosjunior

Dual display of notifications

I am fulfilling a validation before updating a record, if the condition on an allowed restriction, an error is displayed and the record is not updated.
I'm doing this in beforeSave(), the record does not actually update but I have a duplicate notification, the expected error and the project's default success.
Does anyone know how to treat this?

Code:

protected function beforeSave()
{
if(isset($this->record->status) && $this->record->status == 'In production') {
$noworking = new WorkingDays();
$check = $noworking->noWorking($this->record->wait_date_at);

if($check) {
// return error
return Notification::make()
->title('OPS!')
->body('Error')
->danger()
->seconds(10)
->send();
}
}
}
Captura_de_tela_2023-07-06_105414.png
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Display Database Notifications
FilamentFFilament / ❓┊help
3y ago
Display Notifications for different panels
FilamentFFilament / ❓┊help
15mo ago
Notifications reduction of amount of showed notifications
FilamentFFilament / ❓┊help
3y ago
Unable to display notifications in admin panel
FilamentFFilament / ❓┊help
3y ago