Example #1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     //
     $m = new MessageJob();
     $result = $m->broadcast($this->option('message'));
     if ($result) {
         $this->info('Broadcast message success, detail subscribers sends :');
         $this->table(['name', 'email'], $result);
     }
 }
Example #2
0
 /**
  * Create a new event instance.
  *
  * @return void
  */
 public function __construct($to)
 {
     //
     $send = new MessageJob($to);
     $send->handle();
 }