Files
ladill-meet/app/Console/Commands/SendMeetingReminders.php
T
isaaccladandCursor 965fb992e9
Deploy Ladill Meet / deploy (push) Failing after 7s
Initial Ladill Meet release.
Phases 0–18: core meetings, webinar, breakouts, team chat, live streaming, town hall, billing, and Ladill Mail calendar wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 23:35:29 +00:00

35 lines
944 B
PHP

<?php
namespace App\Console\Commands;
use App\Models\Room;
use App\Models\User;
use App\Services\Meet\MeetNotificationService;
use Illuminate\Console\Command;
class SendMeetingReminders extends Command
{
protected $signature = 'meet:send-reminders';
protected $description = 'Send reminders for meetings starting within the next 15 minutes';
public function handle(MeetNotificationService $notifications): int
{
$rooms = Room::where('status', 'scheduled')
->whereBetween('scheduled_at', [now(), now()->addMinutes(15)])
->whereNull('deleted_at')
->get();
foreach ($rooms as $room) {
$host = User::where('public_id', $room->host_user_ref)->first();
if ($host) {
$notifications->sendReminder($room, $host);
}
}
$this->info('Sent '.$rooms->count().' reminder(s).');
return self::SUCCESS;
}
}