2026-01-08 16:22:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
2026-01-09 13:18:37 +00:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
2026-01-08 16:22:47 +00:00
|
|
|
|
|
|
|
|
class TextWidget extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'title',
|
|
|
|
|
'description',
|
|
|
|
|
'content',
|
2026-01-09 13:18:37 +00:00
|
|
|
'category_id',
|
2026-01-08 16:22:47 +00:00
|
|
|
];
|
2026-01-09 13:18:37 +00:00
|
|
|
|
|
|
|
|
public function category(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Category::class);
|
|
|
|
|
}
|
2026-01-08 16:22:47 +00:00
|
|
|
}
|