I'm using your plugin to send messages to users about meetings.
Actually all messages are send to the first number. If I use the Log gateway it records every message send to the good user (different from what it really appends), so I think it's probably a mistake in my code but I can't find where.
Any help would be greatly appreciated.
use Softon\Sms\Facades\Sms;
public function sendingSms()
{
$day = Carbon::now();
$fake_meetings = collect([]);
$first = new stdClass();
$first->phone = '0600000000';
$first->date = $day->copy()->setDate(2017, 2, 21)->setTime(9, 0, 0);
$fake_meetings->push($first);
$second = new stdClass();
$second->phone = '0600000001';
$second->date = $day->copy()->setDate(2017, 2, 21)->setTime(9, 20, 0);
$fake_meetings->push($second);
$fake_meetings->each(function ($meeting) {
$date = $meeting->date;
$date = utf8_encode($date->formatLocalized('%A %d %B %Y %H:%M'));
$message_datas = [
'begins_at' => $date,
];
self::getSmsRecall($meeting->phone, $message_datas);
});
}
private static function getSmsRecall($phone, $message_datas)
{
$r = Sms::send($phone, 'sms.recall', [
'begins_at' => $message_datas['begins_at'],
]);
}