37 lines
1.0 KiB
PHP
37 lines
1.0 KiB
PHP
<?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!');
|
||
|
|
}
|
||
|
|
}
|