*/ public function toArray(Request $request): array { return [ "id" => $this->id, "name" => $this->name, "type" => $this->type, "object_type" => $this->object_type, "object_id" => $this->object_id==0?null:$this->object_id, "nodes" => json_decode($this->nodes_config), "status" => $this->status, "created_by" => new UserProfileResource($this->createdBy), "created_at" => (string)$this->created_at, "updated_at" => (string)$this->updated_at, ]; } }