Files
fitness/app/Notifications/InactivityReminder.php
T

37 lines
1.0 KiB
PHP
Raw Normal View History

2026-08-10 12:32:17 +03:00
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class InactivityReminder extends Notification implements ShouldQueue
{
use Queueable;
/**
* Get the notification's delivery channels.
*
* @return array<int, string>
*/
public function via(object $notifiable): array
{
return ['mail'];
}
/**
* Get the mail representation of the notification.
*/
public function toMail(object $notifiable): MailMessage
{
return (new MailMessage)
->subject("We haven't seen you in a while, {$notifiable->name}")
->line('It has been a few days since your last completed workout.')
->line('A short session today is better than a perfect one you keep putting off.')
->action('Start a Workout', route('workouts.index'))
->line('See you back soon!');
}
}