*/ #[\Override] protected $fillable = [ 'question', 'answer', 'theme_id', ]; /** * The relations to eager load on every query. * * @var list */ #[\Override] protected $with = ['theme']; // * EVENTS /** * Perform any actions required after the model boots. */ protected static function booted(): void { static::created(fn () => self::removeCached()); static::updated(fn () => self::removeCached()); static::deleted(fn () => self::removeCached()); } // * RELATIONS /** * Theme relation * * @return BelongsTo */ public function theme(): BelongsTo { return $this->belongsTo(FaqTheme::class, 'theme_id'); } /** * Activities logs One-to-many relationship. * * @return HasMany */ public function activityLogs(): HasMany { return $this->hasMany(ActivityLog::class); } }