Search Results

Laravel using where clause on a withCount method

Laravel using where clause on a withCount method

Eloquent has one less-known function called withCount(): it helps to get the amount of related records inside of the main object. It also works with t...