title: How to delete multiple row from DB table by laravel?
body: <p>I want to delete all comments from comments table.I did that by doing this but this is not the laravel way. Anyone answer the correct steps please .</p>
  
  <pre><code>$comments = Comment::where('post_id',$id)-&gt;get();
      if(count($comments)&gt;1)
      {
          $comment_id= [];
          foreach ($comments as $i)
          {
              $comment_id[] = $i-&gt;id;
          }
          for($i=0;$i&lt;count($comments);$i++)
          {
              Comment::find($comment_id[$i])-&gt;delete();
          }
      }
      elseif (count($comments)==1)
      {
          $comments-&gt;delete();
      }
  </code></pre>
  
  <p></p>