2024-05-24 23:48:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2024-05-25 12:47:48 +00:00
|
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
2024-05-24 23:48:23 +00:00
|
|
|
|
|
|
|
class Bookmark extends Model
|
|
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
protected $table = 'bookmarks';
|
|
|
|
|
2024-05-25 12:47:48 +00:00
|
|
|
public function tags(): HasMany
|
2024-05-24 23:48:23 +00:00
|
|
|
{
|
|
|
|
return $this->hasMany(BookmarkTag::class, 'bookmark_id');
|
|
|
|
}
|
|
|
|
}
|