app/Module/RecentChangesModule.php
private function getRecentChanges(Tree $tree, int $days): array
    {
        return DB::table('change')
            ->where('gedcom_id', '=', $tree->id())
            ->where('status', '=', 'accepted')
            ->where('new_gedcom', '<>', '')
            ->where('change_time', '>', Carbon::now()->subDays($days))
            ->groupBy('xref')
            ->pluck('xref')
            ->map(static function (string $xref) use ($tree): ?GedcomRecord {
                return GedcomRecord::getInstance($xref, $tree);
            })
            ->filter(static function (?GedcomRecord $record): bool {
                return $record instanceof GedcomRecord && $record->canShow();
            })
            ->all();
    }
private function getRecentChanges(Tree $tree, int $days): array
    {
        return DB::table('change')
            ->where('gedcom_id', '=', $tree->id())
            ->where('status', '=', 'accepted')
            ->where('new_gedcom', '<>', '')
            ->where('change_time', '>', Carbon::now()->subDays($days))
            ->groupBy('xref')
            ->pluck('xref')
            ->map(static function (string $xref) use ($tree): ?GedcomRecord {
                return GedcomRecord::getInstance($xref, $tree);
            })
            ->filter(static function (?GedcomRecord $record): bool {
                return $record instanceof GedcomRecord && $record->canShow();
            })
            ->all();
    }
private function getRecentChanges ( Tree $ tree , int $ days ) : array { return DB :: table ( 'change' ) -> where ( 'gedcom_id' , '=' , $ tree -> id ( ) ) -> where ( 'status' , '=' , 'accepted' ) -> where ( 'new_gedcom' , '<>' , '' ) -> where ( 'change_time' , '>' , Carbon :: now ( ) -> subDays ( $ days ) ) -> groupBy ( 'xref' ) -> pluck ( 'xref' ) -> map ( static function ( string $ xref ) use ( $ tree ) : ? GedcomRecord { return GedcomRecord :: getInstance ( $ xref , $ tree ) ; } ) -> filter ( static function ( ? GedcomRecord $ record ) : bool { return $ record instanceof GedcomRecord && $ record -> canShow ( ) ; } ) -> all ( ) ; }
Find records that have changed since a given julian day

@param Tree $tree Changes for which tree
@param int  $days Number of days

@return GedcomRecord[] List of records with changes
Find records that have changed since a given julian day