Add inactivity reminder emails
No app/Notifications existed beyond Laravel's stock email verification and password reset - nothing brought lapsed users back. Adds a queued InactivityReminder mail notification and a scheduled command (app:send-inactivity-reminders, daily at 09:00) that emails verified users with no completed workout session in the last 5 days, at most once per 7-day cooldown so it can't spam. Skips brand-new signups so it doesn't nag someone who registered an hour ago. Verified the full pipeline live: scheduled command queues the notification (QUEUE_CONNECTION=database), a queue worker processes it, and the rendered email lands in the log driver with a working link back to /workouts. Production still needs cron actually invoking `php artisan schedule:run` every minute and a running queue worker - that's part of the pending deployment setup, not something this change can provide on its own. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -74,6 +74,11 @@ class User extends Authenticatable
|
||||
return $this->hasMany(Program::class);
|
||||
}
|
||||
|
||||
public function workoutSessions()
|
||||
{
|
||||
return $this->hasMany(WorkoutSession::class);
|
||||
}
|
||||
|
||||
// Trainer/client relationships
|
||||
public function clients()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user