feat: added notifications (#795)

This commit is contained in:
Kyrch authored and GitHub committed 2025-04-11 18:38:36 -03:00
1 parent 9e46ba9a2c
commit bc9df20162
60 files changed
+1259 -114

No files matched your search

+1 -4
View File
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace App\Notifications;
use App\Enums\NotificationType;
use App\Enums\Models\User\NotificationType;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Contracts\Support\Arrayable;
@@ -24,14 +24,12 @@ class UserNotification extends Notification implements Arrayable, ShouldQueue
* @param string $body
* @param NotificationType $type
* @param string|null $image
* @param array<string, mixed>|null $data
*/
public function __construct(
public string $title,
public string $body,
public NotificationType $type,
public ?string $image = null,
public ?array $data = [],
) {}
/**
@@ -59,7 +57,6 @@ class UserNotification extends Notification implements Arrayable, ShouldQueue
'body' => $this->body,
'type' => $this->type->value,
'image' => $this->image,
'data' => $this->data,
];
}
}