24 lines
471 B
PHP
24 lines
471 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
class Faq extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
use HasFactory;
|
|
protected $table = 'faqs';
|
|
|
|
protected $fillable = ['question', 'answers', 'faq_category_id'];
|
|
|
|
public function faqCategory()
|
|
{
|
|
return $this->belongsTo(MainCategory::class, 'faq_category_id', 'id');
|
|
}
|
|
}
|