芝麻web文件管理V1.00
编辑当前文件:/home/forge/stage.sksb.smartcon-survey.com/app/Livewire/OpenAnswers.php
disableShow = count($this->selected) === 0; $comments = Comment::where('show', 0) ->where('text', '!=', null) ->with('topic') ->orderByDesc('id') ->get(); return view('livewire.open-answers', ['comments' => $comments]); } public function saveData() { if (count($this->selected) > 0) { foreach ($this->selected as $commentId) { Comment::showComment($commentId); } session()->flash('comment_success', 'Die Daten wurden erfolgreich gespeichert.'); } } public function updateComment(int $id, string $newComment): void { Comment::updateComment($id, $newComment); session()->flash('comment_success', 'Das Antwort wurde erfolgreich aktualisiert.'); } public function deleteInterview(int $commentId) { Comment::hideComment($commentId); session()->flash('comment_success', 'Die Antwort wurden erfolgreich gelöscht.'); return redirect(route('openanswers.index')); } public function toggleAllCheckboxes(bool $checkboxStatus): void { if ($checkboxStatus === false || count($this->selected) > 0) { $this->selected = []; } else { $comments = Comment::where('show', 0)->with('topic')->get(); foreach ($comments as $comment) { $this->selected[] = $comment->id; } } } }