UserAddressModel.php
504 Bytes
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class UserAddressModel extends Model
{
protected $table = 'user_address';
public $timestamps = false;
//
protected $fillable = [
];
const ADDRESS_TYPE_PERSONAL = 1;
const ADDRESS_TYPE_COMPANY = 2;
public function user()
{
return $this->belongsTo(UserModel::class);
}
public function country()
{
return $this->hasOne(CountryModel::class, 'id', 'country');
}
}