39 lines
872 B
PHP
39 lines
872 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* FaqQuestion.
|
|
*
|
|
* @property string $question Question
|
|
* @property string $answer Answer
|
|
* @property-read \Illuminate\Support\Carbon $created_at Creation Date.
|
|
* @property-read \Illuminate\Support\Carbon $updated_at Last update Date.
|
|
*
|
|
* @property-read \App\Models\FaqTheme $theme Associated theme.
|
|
*/
|
|
class FaqQuestion extends Model
|
|
{
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array
|
|
*/
|
|
protected $fillable = [
|
|
'question',
|
|
'answer',
|
|
'theme_id'
|
|
];
|
|
|
|
/**
|
|
* Theme relation
|
|
*
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
*/
|
|
public function theme()
|
|
{
|
|
return $this->belongsTo(FaqTheme::class, 'theme_id');
|
|
}
|
|
}
|