isChecked ? false : true; } public function save() { $this->toggle(); $comment = new DietComment(); $comment->grade = $this->grade; $comment->body = $this->body; $comment->diet_id = $this->diet->id; $comment->user_id = $this->user->id; $comment->save(); $this->reset(['body', 'grade']); $this->dispatch('commentAdded')->to('diet.comment.show'); } }