validate([ 'body' => 'required|min:10', 'grade' => 'required', ]); $comment = new PlanComment(); $comment->grade = $this->grade; $comment->body = $this->body; $comment->plan_id = $this->plan->id; $comment->user_id = $this->user->id; $comment->save(); $this->reset(['body', 'grade']); $this->dispatch('commentAdded')->to('plan.comment.show'); } }