add bookmark back
This commit is contained in:
10
app/Models/Bookmark.php
Normal file
10
app/Models/Bookmark.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Bookmark extends Model
|
||||
{
|
||||
protected $guarded = [];
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App;
|
||||
|
||||
use App\Models\Bookmark;
|
||||
use App\Models\Image;
|
||||
use App\Models\Memo;
|
||||
use App\Models\ToDoList;
|
||||
@@ -64,6 +65,11 @@ class User extends Authenticatable
|
||||
return $this->hasMany(ToDoList::class);
|
||||
}
|
||||
|
||||
public function bookmarks() : HasMany
|
||||
{
|
||||
return $this->hasMany(Bookmark::class);
|
||||
}
|
||||
|
||||
public function images(): MorphMany
|
||||
{
|
||||
return $this->morphMany(Image::class, 'imageable');
|
||||
|
||||
Reference in New Issue
Block a user