37 lines
886 B
PHP
37 lines
886 B
PHP
<?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";
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|