$this->id, 'object' => 'task', 'title' => $this->title, 'description' => $this->description, 'completed' => (bool) $this->completed, 'completed_at' => (is_null($this->completed_at) ? null : $this->completed_at->format(config('api.timestamp_format'))), 'account' => [ 'id' => $this->account->id, ], 'contact' => new ContactShortResource($this->contact), 'created_at' => $this->created_at->format(config('api.timestamp_format')), 'updated_at' => (is_null($this->updated_at) ? null : $this->updated_at->format(config('api.timestamp_format'))), ]; } }