mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-11-13 09:38:48 +01:00
feat: added notifications (#795)
This commit is contained in:
1 parent
9e46ba9a2c
commit
bc9df20162
60 files changed
+1259
-114
No files matched your search
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user