$this->id, 'type' => $this->type, 'source' => $this->source, 'source_id' => $this->source_id, 'title' => $this->title, 'message' => $this->message, 'recipient' => $this->recipient, 'recipient_position' => $this->recipient_position, 'recipient_sector' => $this->recipient_sector, 'created_by' => $this->created_by, 'created_by_user' => $this->whenLoaded('createdBy', fn() => new UserResource($this->createdBy)), 'created_at' => Carbon::parse($this->created_at)->format('Y-m-d H:i:s'), 'updated_at' => Carbon::parse($this->updated_at)->format('Y-m-d H:i:s'), ]; } }