34 lines
667 B
PHP
34 lines
667 B
PHP
<?php
|
|
|
|
namespace Koneko\VuexyWebsiteAdmin\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Faq extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'category_id',
|
|
'question',
|
|
'answer',
|
|
'order',
|
|
'is_active',
|
|
];
|
|
|
|
protected $casts = [
|
|
'order' => 'integer',
|
|
'is_active' => 'boolean',
|
|
];
|
|
|
|
/**
|
|
* Categoría a la que pertenece esta FAQ.
|
|
*/
|
|
public function category(): BelongsTo
|
|
{
|
|
return $this->belongsTo(FaqCategory::class, 'category_id');
|
|
}
|
|
}
|