feat: add persistent mobile notifications
CI / 🧪 Tests Laravel (push) Successful in 2m7s
CI / 🐳 Build & Push Image (push) Successful in 42s

This commit is contained in:
2026-08-11 16:46:05 +02:00
parent bd1b4bba20
commit df4f523089
24 changed files with 822 additions and 75 deletions
@@ -0,0 +1,39 @@
<?php
namespace App\Notifications;
use App\Enums\IdentityVerificationStatus;
use App\Models\IdentityVerificationRequest;
use App\Services\MobileDeepLink;
class CertificationReviewedNotification extends MobileNotification
{
public function __construct(
private readonly IdentityVerificationRequest $verificationRequest,
) {
parent::__construct();
}
protected function category(): string
{
return self::CATEGORY_ACCOUNT;
}
protected function payload(object $notifiable): array
{
$approved = $this->verificationRequest->status === IdentityVerificationStatus::APPROVED;
return [
'type' => $approved ? 'certification_approved' : 'certification_rejected',
'title' => $approved
? __('api.notifications.certification_approved_title')
: __('api.notifications.certification_rejected_title'),
'body' => $approved
? __('api.notifications.certification_approved_body')
: __('api.notifications.certification_rejected_body', [
'reason' => $this->verificationRequest->rejection_reason,
]),
'url' => MobileDeepLink::to('profile/settings/certification'),
];
}
}