title: how do i delete a notification in laravel when a user deletes the comment related to the notification
body: <p>I have set up my website to send a notification to the owner of a post when another user comments on the post saying '&quot;name of the user&quot; commented on your post'</p>
  <p>I need to be able to delete this notification if the user that made the comment deleted the post as if it is not deleted the other user can still click on the notification and then then get an error because the post no longer exists same with the comment if a user deletes the comment the notification should be deleted.</p>
  <p>this is how i create a comment and send the notification in my CommentsController:</p>
  <pre><code>public function store(Request $request, $post_id)
  {
      $this-&gt;validate($request, array(
          'comment' =&gt; 'required|min:2|max:2000',
          'email' =&gt; 'required',
          'name' =&gt; 'required'
      ));
  
      $post = Post::find($post_id);
      $user = Auth::user();
  
      $comment = new Comment();
      $comment-&gt;name = $request-&gt;name;
      $comment-&gt;email = $request-&gt;email;
      $comment-&gt;comment = $request-&gt;comment;
      $comment-&gt;approved = true;
      $comment-&gt;post_id = $post-&gt;id;
      $comment-&gt;user_id = $user-&gt;id;
      $comment-&gt;post()-&gt;associate($post);
      $comment-&gt;save();
  
      User::find($post-&gt;user_id)-&gt;notify(new CommentCreated($user, $post, $comment));
      return redirect()-&gt;back()-&gt;with('success','Comment Created');
  }
  </code></pre>
  <p>So i think that i have to delete the notification in the destroy function but i'm not sure how to do this.</p>
  <p>this is my destroy function:</p>
  <pre><code>public function destroy($id)
  {
      $comment = Comment::find($id);
      if(auth()-&gt;user()-&gt;id == $comment-&gt;user_id || auth()-&gt;user()-&gt;role == 'Admin') {
          $comment-&gt;delete();
          return redirect()-&gt;back()-&gt;with('success','Comment Removed');
      }
      
      return redirect('/posts')-&gt;with('error','Unauthorised Page');
  
  }
  </code></pre>