© 2026 Hedgehog Software, LLC
min
max
strictMode
Attempted to lazy load [minDose] on model [App\Models\PatientMedication] but lazy loading is disabled.
TextColumn
// MedicationDoseRelationManager // ... TextColumn::make('medicationDoseRange') ->label('Dose'), // ...
class PatientMedication extends Model { public function minDose(): BelongsTo { return $this->belongsTo(Dose::class, 'min_dose_id'); } public function maxDose(): BelongsTo { return $this->belongsTo(Dose::class, 'max_dose_id'); } protected function medicationDoseRange(): Attribute { return Attribute::make( get: function () { $consolidatedValue = $this->minDose->name === $this->maxDose->name; // Error get trown return $consolidatedValue ? $this->minDose->name : $this->minDose->name.' - '.$this->maxDose->name; } ); } }