© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•14mo ago•
6 replies
Lei✨

How to display notification message?

Hello everyone.
I am building simcard management dashboard.
I have datagrid table prebuilt using filament table, and it contains "Activate simcard" button on each row, so if I click it, modal opens. the modal is built with form.

But what my problem is, after clicking Submit button on modal and after closing a modal, I want to show notification message, of course, I know notification works with livewire component, and @livewire('notifications') part should be added somewhere, but as you know, Filament doesn't provide any livewire component as default, so there is no app.blade.php file as default.

Regarding this problem, I created a new app.blade.php file manually in to resource/views/components/layouts folder, and I added 'layout' => 'components.layouts.app' to config/filament.php, but notification not showing after submitting on modal.

I don't want to create new livewire components for adding form on modal.

// This is SimcardResource class
...
public static function table(Table $table): Table
{
  ...
  ->actions([
                Action::make('simcardActivate')
                    ->label('Aktiver simkort')
                    ->visible(fn (Simcard $record): bool => empty($record->Phone))
                    ->form([
                        ...
                    ])
                    ->action(function (array $data, Simcard $record): void {
                        $baserowApi = new BaserowApi();
                        $response = $baserowApi->updateRecord();

                        if ($response->successful()) {
                            Notification::make()
                                ->title('Success!')
                                ->body('Your action 1 was successful.')
                                ->success()
                                ->send();
                        }
                    })
            ])
}
// This is SimcardResource class
...
public static function table(Table $table): Table
{
  ...
  ->actions([
                Action::make('simcardActivate')
                    ->label('Aktiver simkort')
                    ->visible(fn (Simcard $record): bool => empty($record->Phone))
                    ->form([
                        ...
                    ])
                    ->action(function (array $data, Simcard $record): void {
                        $baserowApi = new BaserowApi();
                        $response = $baserowApi->updateRecord();

                        if ($response->successful()) {
                            Notification::make()
                                ->title('Success!')
                                ->body('Your action 1 was successful.')
                                ->success()
                                ->send();
                        }
                    })
            ])
}

I am not sure how to display notification without creating livewire component on modal.
Solution
Ok, I found the solution using Render hooks.
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

How to modify delete action notification message
FilamentFFilament / ❓┊help
3y ago
Custom & display validation message
FilamentFFilament / ❓┊help
7mo ago
How to display hasMany
FilamentFFilament / ❓┊help
3y ago
How to display a custom message when there are no options to display in Checkbox list?
FilamentFFilament / ❓┊help
2y ago