<?php


namespace App\Factory\SMSFactory;


use App\Enums\SMSEnums;
use App\Models\SMSLog;

class SMSBase
{
    public function saveMessageToDB($message, $type, $user, $response, $code=null){
        SMSLog::query()->create([
            'user_id'   =>  $user->id,
            'message'   =>  $message,
            'type'      =>  $type,
            'code'      =>  $code,
            'vendor'    =>  SMSEnums::VODAFONE,
            'vendor_response'   =>  $response
        ]);
    }
}
