© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•13mo ago
xr0m3oz

Filament custom exeptions Notifications

I want to catch my exceptions that interrupt the code, but at the same time do not show the client of the site, an incomprehensible window with an error. And in the notification it shows the error text.

But I can't get the one that when I click on the submit form button, the button freezes and an error appears in the console.

But if I reload the page, the notification appears.

How can I finish this correctly?
bootstrap/app.php
    ->withExceptions(function (Exceptions $exceptions) {
        $exceptions->render(function (\App\Exceptions\FilamentNotificationException $e, $request) {
            \Filament\Notifications\Notification::make()
                ->title('Ошибка')
                ->body($e->getMessage())
                ->danger()
                ->send();

            return response()->json(['success' => true, 'message' => $e->getMessage()], 200);
        });
    })
    ->withExceptions(function (Exceptions $exceptions) {
        $exceptions->render(function (\App\Exceptions\FilamentNotificationException $e, $request) {
            \Filament\Notifications\Notification::make()
                ->title('Ошибка')
                ->body($e->getMessage())
                ->danger()
                ->send();

            return response()->json(['success' => true, 'message' => $e->getMessage()], 200);
        });
    })
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

Filament Notifications outside Filament
FilamentFFilament / ❓┊help
3y ago
how to send custom notifications in filament
FilamentFFilament / ❓┊help
3y ago
Filament Database Notifications
FilamentFFilament / ❓┊help
3y ago
Filament Core Notifications
FilamentFFilament / ❓┊help
3y ago