'datetime' ]; /** * Get the intervention that owns the practitioner assignment. */ public function intervention(): BelongsTo { return $this->belongsTo(Intervention::class); } /** * Get the practitioner assigned to the intervention. */ public function practitioner(): BelongsTo { return $this->belongsTo(Thanatopractitioner::class, 'practitioner_id'); } /** * Scope to get principal practitioners. */ public function scopePrincipal($query) { return $query->where('role', 'principal'); } /** * Scope to get assistant practitioners. */ public function scopeAssistant($query) { return $query->where('role', 'assistant'); } }