count collection laravel code example Example: pluck laravel $name = DB::table('users')->where('name', 'John')->pluck('name');