urlsnail/app/Models/Tag.php

20 lines
383 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
2024-05-29 21:07:23 +00:00
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class Tag extends Model
{
use HasFactory;
2024-05-26 20:37:36 +00:00
protected $fillable = ['name'];
2024-05-29 21:07:23 +00:00
public function bookmarks(): BelongsToMany
{
return $this->belongsToMany(Bookmark::class);
}
}