i18n vocabulaire exos (fr/pt-BR) + Web Push rappels de série
Build & Deploy / build (push) Successful in 17s
Build & Deploy / build (push) Successful in 17s
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Functional\Users\Notifications;
|
||||
|
||||
use Illuminate\Notifications\Notification;
|
||||
use NotificationChannels\WebPush\WebPushChannel;
|
||||
use NotificationChannels\WebPush\WebPushMessage;
|
||||
|
||||
/** Notification de test envoyée quand l'utilisateur active/teste les rappels push. */
|
||||
class PushTestNotification extends Notification
|
||||
{
|
||||
/** @return array<int,string> */
|
||||
public function via(object $notifiable): array
|
||||
{
|
||||
return [WebPushChannel::class];
|
||||
}
|
||||
|
||||
public function toWebPush(object $notifiable): WebPushMessage
|
||||
{
|
||||
return (new WebPushMessage())
|
||||
->title('🔥 StreakFit')
|
||||
->body('Notifications activées — on te préviendra pour garder ta flamme !')
|
||||
->icon('/pwa-192.png')
|
||||
->badge('/pwa-192.png')
|
||||
->data(['url' => '/'])
|
||||
->options(['TTL' => 3600]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user