forum_uuid = $data['forum_uuid'] ?? $thread->forum_uuid; $thread->prefix_uuid = $data['prefix_uuid'] ?? $thread->prefix_uuid; $thread->updated_uuid = $data['updated_uuid'] ?? $thread->updated_uuid; $thread->lastpost_uuid = $data['lastpost_uuid'] ?? $thread->lastpost_uuid; $thread->firstpost_uuid = $data['firstpost_uuid'] ?? $thread->firstpost_uuid; $thread->title = $data['title'] ?? $thread->title; $thread->slug = $data['slug'] ?? $thread->slug; $thread->views = $data['views'] ?? $thread->views; $thread->posts = $data['posts'] ?? $thread->posts; $thread->users()->sync($data['users'] ?? []); $thread->groups()->sync($data['groups'] ?? []); return $thread->save(); } }