26 lines
456 B
PHP
26 lines
456 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class EntityTagMap extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'tag_id',
|
|
'entity_type',
|
|
'entity_id',
|
|
];
|
|
|
|
public function tag(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Tag::class);
|
|
}
|
|
}
|