*/ protected $fillable = ['news_id', 'category']; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'category' => NewsCategoryEnum::class, ]; /** * The relation with News * * @return BelongsTo */ public function news(): BelongsTo { return $this->belongsTo(News::class); } }