<?php

namespace twa\ecomauth\models;

//use App\Http\Repositories\TWAPhoneFunctions;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use twa\apilibs\controllers\PhoneFunctionsController;

class EcomUsersModel extends Model
{
    use HasFactory;
    protected $table = "ecom_users";
    protected $casts = [
      'cms_attributes' => 'array'
    ];
//    protected $appends = ['phone_country_code','phone_original'];
//
//    public function getPhoneCountryCodeAttribute($value){
//        return PhoneFunctionsController::getCountry($this->phone);
//    }
//
//    public  function getPhoneOriginalAttribute(){
//        return PhoneFunctionsController::formatNational($this->phone,PhoneFunctionsController::getCountry($this->phone));
//
//    }
}
