urlsnail/app/Models/Bookmark.php

20 lines
383 B
PHP
Raw Normal View History

<?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;
class Bookmark extends Model
{
use HasFactory;
protected $table = 'bookmarks';
2024-05-25 12:47:48 +00:00
public function tags(): HasMany
{
return $this->hasMany(BookmarkTag::class, 'bookmark_id');
}
}