$this->id ?? null, 'user_id' => $this->user_id ?? null, 'firstname' => $this->firstname ?? null, 'lastname' => $this->lastname ?? null, 'email' => $this->email ?? null, 'phone' => $this->phone ?? null, 'full_name' => trim((string) ($this->firstname ?? '').' '.(string) ($this->lastname ?? '')), 'role' => [ 'name' => $this->role_name ?? $this->active_role ?? null, 'label' => $this->role_name ?? $this->active_role ?? null, ], 'status' => strtolower((string) ($this->active_role ?? '')) === 'inactive' ? 'inactive' : 'active', 'role_name' => $this->role_name ?? null, 'active_role' => $this->active_role ?? null, 'school_year' => $this->school_year ?? null, 'class_section' => $this->class_section ?? null, 'verification_issue' => (bool) ($this->verification_issue ?? false), 'school_id' => $this->school_id ?? null, 'created_at' => optional($this->created_at)->toDateTimeString(), 'updated_at' => optional($this->updated_at)->toDateTimeString(), ]; } }