<?php

namespace App\Trait;

use App\Models\Note;

trait HasNotes {
    public function notes() {
        return $this->morphMany(Note::class, 'owner');
    }

    public function keyInfo() {
        return $this->notes()->where('is_primary', true);
    }
}
