wi-events/console/EventManageCommand.php

37 lines
886 B
PHP
Raw Permalink Normal View History

2023-03-27 23:10:51 +02:00
<?php namespace Zoomyboy\Event\Console;
use Winter\Storm\Console\Command;
use Zoomyboy\Event\Models\Participant;
class EventManageCommand extends Command
{
/**
* @var string The console command name.
*/
protected static $defaultName = 'Manage events';
/**
* @var string The name and signature of this command.
*/
protected $signature = 'event:manage';
/**
* @var string The console command description.
*/
protected $description = 'No description provided yet...';
/**
* Execute the console command.
* @return void
*/
public function handle()
{
foreach (Participant::get() as $participant) {
if (in_array('2e', $participant->payload['courses']) || in_array('3c', $participant->payload['courses'])) {
echo $participant->email."\n";
}
}
}
}