How to get count from HasManyThrough relationship with pivot table in Laravel
I want to count how many candidates contest has. I have 4 tables: CONTEST id name from until VACANCY id contest_id name description USER id name pivot table: USER_VACANCY id user_id vacancy_id My Contest model protected $fillable = [ 'name',…