app/Http/Controllers/Admin/ControlPanelController.php
private function totalChanges(): array
    {
        return DB::table('gedcom')
            ->leftJoin('change', static function (JoinClause $join): void {
                $join
                    ->on('change.gedcom_id', '=', 'gedcom.gedcom_id')
                    ->where('change.status', '=', 'pending');
            })
            ->groupBy('gedcom.gedcom_id')
            ->pluck(DB::raw('COUNT(change_id)'), 'gedcom.gedcom_id')
            ->all();
    }
private function totalChanges(): array
    {
        return DB::table('gedcom')
            ->leftJoin('change', static function (JoinClause $join): void {
                $join
                    ->on('change.gedcom_id', '=', 'gedcom.gedcom_id')
                    ->where('change.status', '=', 'pending');
            })
            ->groupBy('gedcom.gedcom_id')
            ->pluck(DB::raw('COUNT(change_id)'), 'gedcom.gedcom_id')
            ->all();
    }
private function totalChanges ( ) : array { return DB :: table ( 'gedcom' ) -> leftJoin ( 'change' , static function ( JoinClause $ join ) : void { $ join -> on ( 'change.gedcom_id' , '=' , 'gedcom.gedcom_id' ) -> where ( 'change.status' , '=' , 'pending' ) ; } ) -> groupBy ( 'gedcom.gedcom_id' ) -> pluck ( DB :: raw ( 'COUNT(change_id)' ) , 'gedcom.gedcom_id' ) -> all ( ) ; }
Count the number of pending changes in each tree.

@return string[]
Count the number of pending changes in each tree .