Answers for "withCount laravel assign generic name"

PHP
0

withCount laravel assign generic name

$users = User::withCount([
    'posts', 
    'comments', 
    'comments as approved_comments_count' => function ($query) {
        $query->where('approved', 1);
	}
])->get();
Posted by: Guest on May-13-2021

Code answers related to "withCount laravel assign generic name"

Browse Popular Code Answers by Language