diff options
Diffstat (limited to 'app/Module/FamilyTreeFavoritesModule.php')
| -rw-r--r-- | app/Module/FamilyTreeFavoritesModule.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/Module/FamilyTreeFavoritesModule.php b/app/Module/FamilyTreeFavoritesModule.php index 482f3aa587..f5ddb8a50f 100644 --- a/app/Module/FamilyTreeFavoritesModule.php +++ b/app/Module/FamilyTreeFavoritesModule.php @@ -116,13 +116,21 @@ class FamilyTreeFavoritesModule extends AbstractModule implements ModuleBlockInt * * @param Tree $tree * - * @return array<object> + * @return array<int,object{ + * favorite_id:string, + * favorite_type:string, + * url:string|null, + * note:string|null, + * title:string|null, + * record:GedcomRecord|null + * }> */ public function getFavorites(Tree $tree): array { return DB::table('favorite') ->where('gedcom_id', '=', $tree->id()) ->whereNull('user_id') + ->select(['favorite_id', 'xref', 'favorite_type', 'url', 'title', 'note']) ->get() ->map(static function (object $row) use ($tree): object { if ($row->xref !== null) { |
