start add Memos

This commit is contained in:
2020-03-22 18:54:13 +01:00
parent 18d0841a7d
commit 11511039e9
24 changed files with 10969 additions and 103 deletions

27
app/Models/Memo.php Normal file
View File

@@ -0,0 +1,27 @@
<?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');
// }
}