<?php

namespace App\Trait;

use App\Models\Address;

trait HasAddresses {
    public function addresses() {
        return $this->morphMany(Address::class, 'owner');
    }

    public function currentAddress() {
        return $this->morphOne(address::class, 'owner')->where('is_current', true);
    }
}