app/Http/Controllers/Admin/ControlPanelController.php
private function totalFamilies(): Collection
    {
        return DB::table('gedcom')
            ->leftJoin('families', 'f_file', '=', 'gedcom_id')
            ->groupBy('gedcom_id')
            ->pluck(DB::raw('COUNT(f_id)'), 'gedcom_id')
            ->map(static function (string $count) {
                return (int) $count;
            });
    }
private function totalFamilies(): Collection
    {
        return DB::table('gedcom')
            ->leftJoin('families', 'f_file', '=', 'gedcom_id')
            ->groupBy('gedcom_id')
            ->pluck(DB::raw('COUNT(f_id)'), 'gedcom_id')
            ->map(static function (string $count) {
                return (int) $count;
            });
    }
private function totalFamilies ( ) : Collection { return DB :: table ( 'gedcom' ) -> leftJoin ( 'families' , 'f_file' , '=' , 'gedcom_id' ) -> groupBy ( 'gedcom_id' ) -> pluck ( DB :: raw ( 'COUNT(f_id)' ) , 'gedcom_id' ) -> map ( static function ( string $ count ) { return ( int ) $ count ; } ) ; }
Count the number of families in each tree.

@return Collection
@return int[]
Count the number of families in each tree .