/** * Execute the console command. */ public function fire() { $this->line('Sending SMS via Twilio to: ' . $this->argument('phone')); // Grab the text option if specified $text = $this->option('text'); // If we havent specified a message, setup a default one if (is_null($text)) { $text = 'This is a test message sent from the artisan console'; } $this->line($text); $this->twilio->message($this->argument('phone'), $text); }
/** * @param string $to * @param string $message * @param string $from * * @return \Services_Twilio_Rest_Message */ public function message($to, $message, $from = null) { $this->logger->info(sprintf('Sending a message ["%s"] to %s', $message, $to)); return $this->wrapped->message($to, $message, $from); }