33 lines
603 B
PHP
33 lines
603 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
use App\Models\User;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Address extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class)->withTrashed();
|
|
}
|
|
|
|
public function country()
|
|
{
|
|
return $this->belongsTo(Country::class)->withTrashed();
|
|
}
|
|
|
|
public function state()
|
|
{
|
|
return $this->belongsTo(State::class)->withTrashed();
|
|
}
|
|
|
|
public function city()
|
|
{
|
|
return $this->belongsTo(City::class)->withTrashed();
|
|
}
|
|
}
|