-1
{{ App\Like::where('post_id', $post->id)->count() }}

I want to fetch rows which have particular post_id and whose 'like' column is set to 1. How can I put another clause?

Azima
  • 3,835
  • 15
  • 49
  • 95

1 Answers1

0
{{ App\Like::where('post_id', $post->id)->where('like', 1)->count() }}

Just put another where