In this article, We will explain to you how to use the Distinct Count query in laravel. The laravel eloquent provides many types of eloquent methods. the Distinct Count method will return the int value.
So you can see below the following example.
$students = DB::table('students')