Files
fotospiel-app/app/Console/Commands/DispatchTenantAnnouncements.php
Codex Agent 8f13465415
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled
Implement tenant announcements and audit log fixes
2026-01-02 14:19:46 +01:00

41 lines
953 B
PHP

<?php
namespace App\Console\Commands;
use App\Services\TenantAnnouncements\TenantAnnouncementService;
use Illuminate\Console\Command;
class DispatchTenantAnnouncements extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'tenant-announcements:dispatch';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Dispatch scheduled tenant announcements and queue email notifications';
/**
* Execute the console command.
*/
public function handle(TenantAnnouncementService $service): int
{
$result = $service->process();
$this->info(sprintf(
'Announcements: %d activated, %d archived, %d emails queued.',
$result['activated'],
$result['archived'],
$result['queued'],
));
return Command::SUCCESS;
}
}