diff --git a/src/Services/Drivers/DatabaseDriver.php b/src/Services/Drivers/DatabaseDriver.php index 64b09bd..794f342 100644 --- a/src/Services/Drivers/DatabaseDriver.php +++ b/src/Services/Drivers/DatabaseDriver.php @@ -23,6 +23,7 @@ public function sendIt( ?string $action = 'system', ?array $data = [], ?int $template_id = null, + ?Notification $notification = null ): void { if ($modelId) { dispatch(new NotifyDatabaseJob([ diff --git a/src/Services/Drivers/Driver.php b/src/Services/Drivers/Driver.php index 8c5986f..06890b4 100644 --- a/src/Services/Drivers/Driver.php +++ b/src/Services/Drivers/Driver.php @@ -2,6 +2,7 @@ namespace TomatoPHP\FilamentAlerts\Services\Drivers; +use Filament\Notifications\Notification; use TomatoPHP\FilamentAlerts\Facades\FilamentAlerts; abstract class Driver @@ -19,7 +20,8 @@ abstract public function sendIt( ?string $type = 'info', ?string $action = 'system', ?array $data = [], - ?int $template_id = null + ?int $template_id = null, + ?Notification $notification = null ): void; public function send( @@ -28,7 +30,8 @@ public function send( int | string | null $modelId = null, array $title = [], array $body = [], - array $data = [] + array $data = [], + ?Notification $notification = null ): void { $loadTemplate = FilamentAlerts::loadTemplate( $template, diff --git a/src/Services/Drivers/EmailDriver.php b/src/Services/Drivers/EmailDriver.php index 6d8db6e..94e7eb1 100644 --- a/src/Services/Drivers/EmailDriver.php +++ b/src/Services/Drivers/EmailDriver.php @@ -23,6 +23,7 @@ public function sendIt( ?string $action = 'system', ?array $data = [], ?int $template_id = null, + ?Notification $notification = null ): void { if ($modelId) { $email = $model::find($modelId)?->email;