<?php

namespace App\Services;

use Twilio;
use App\Helpers\FilterHelper;

class TwilioService
{

    public function __construct()
    {
    }

    public function send_sms($mobile, $msg): bool
    {
        $phone_number =  FilterHelper::fixPhoneNumber($mobile);
        try {
            Twilio::message($phone_number, $msg);
            return true;
        } catch (\Throwable $e) {
            report($e);
            return false;
        }
    }
}
