Kinda built-in support for custom notifications. Had to change viaQueues as well to make it compatible with this commit.
Sample Usage:
`<?php
class customFWChannel {
public function send($notifiable, \Akaunting\Firewall\Notifications\AttackDetected $a) {
\Log::debug('sending to a custom channel');
}
}
Kinda built-in support for custom notifications. Had to change viaQueues as well to make it compatible with this commit. Sample Usage: `<?php
class customFWChannel { public function send($notifiable, \Akaunting\Firewall\Notifications\AttackDetected $a) { \Log::debug('sending to a custom channel'); } }
config()->set('firewall.notifications.custom', [ 'enabled' => true, 'channel' => customFWChannel::class, 'queue' => 'customqueue' ]);
$fakeAttack = (object) [ "ip" => "192.168.240.1", "level" => "medium", "middleware" => "url", "user_id" => 0, "url" => "http://localhost/admin", "referrer" => "NULL", "request" => "", "updated_at" => "2023-10-02T08:53:24.000000Z", "created_at" => "2023-10-02T08:53:24.000000Z", "id" => 61 ]; (new \Akaunting\Firewall\Notifications\Notifiable)->notify( new \Akaunting\Firewall\Notifications\AttackDetected($fakeAttack) );`