22 lines
468 B
PHP
22 lines
468 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Faq extends Model
|
|
{
|
|
protected $fillable = ['faq_category_id', 'question', 'answer', 'order', 'is_active'];
|
|
|
|
protected $casts = [
|
|
'is_active' => 'boolean',
|
|
'order' => 'integer',
|
|
];
|
|
|
|
public function category(): BelongsTo
|
|
{
|
|
return $this->belongsTo(FaqCategory::class, 'faq_category_id');
|
|
}
|
|
}
|