Edit File: IntroFqsCategory.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Relations\HasMany; use App\Traits\ModelTrait; use Spatie\Translatable\HasTranslations; class IntroFqsCategory extends BaseModel { use HasTranslations, ModelTrait; protected $fillable = ['title']; public $translatable = ['title']; /** * Get all of the questions for the IntroFqsCategory * * @return HasMany */ public function questions(): HasMany { return $this->hasMany(IntroFqs::class, 'intro_fqs_category_id', 'id'); } /** * The relations to eager load on every query. * * @var array */ protected $with = [ 'questions', ]; }
Back to File Manager