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>
12 lines
322 B
PHP
12 lines
322 B
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Inspiring;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
Artisan::command('inspire', function () {
|
|
$this->comment(Inspiring::quote());
|
|
})->purpose('Display an inspiring quote');
|
|
|
|
Schedule::command('app:send-inactivity-reminders')->dailyAt('09:00');
|