<?php

namespace App\Models;

use App\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphToMany;

class Memo extends Model
{
    protected $guarded = [];

    public function path()
    {
        return '/memos/' . $this->id;
    }

    public function user()
    {
        return $this->belongsTo(User::class);
    }

//    public function tags(): MorphToMany
//    {
//        return $this->morphToMany(Tag::class, 'taggable')->withTimestamps()->withPivot('user_id');
//    }
}
