Skip to content

Clicking on an action in a database notification does not trigger the event #15026

Closed Answered by LeamonaDor1
LeamonaDor1 asked this question in Help
Discussion options

You must be logged in to vote

The solution is to override the Filament\Notifications\Livewire\DatabaseNotifications component like this:

<?php

namespace App\Livewire;

use Filament\Notifications\Livewire\DatabaseNotifications;
use Livewire\Attributes\On;

class MyDatabaseNotifications extends DatabaseNotifications
{
           #[On('confirm')]
           protected function confirm(): void
           {
              $this->test();
           }

          protected function test(): void
          {
             \Log::info('confirm!!!!!!!!!!!!');
          }
}
<?php

namespace App\Models;

use Filament\Notifications\Notification;

class Bear extends Model
{
         ...
         Notification::make()
              ->per…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LeamonaDor1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant