*/ protected function casts(): array { return [ 'sort_order' => 'integer', 'metadata' => 'array', ]; } /** * @return BelongsTo */ public function attribute(): BelongsTo { return $this->belongsTo(Attribute::class, 'attribute_id'); } }