'integer', 'updated_at' => 'integer', 'deleted_at' => 'integer', ]; public function category(): BelongsTo { return $this->belongsTo(MaterialCategory::class, 'category_id', 'id')->withTrashed(); } public function getCategoryNameAttribute(): string { return (string) ($this->category?->category_name ?? ''); } }