feat: add faq
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user