20 lines
383 B
PHP
20 lines
383 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class Bookmark extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'bookmarks';
|
|
|
|
public function tags(): HasMany
|
|
{
|
|
return $this->hasMany(BookmarkTag::class, 'bookmark_id');
|
|
}
|
|
}
|