From aeff0704c47f45e7bcd5f221459e67440db9c3bd Mon Sep 17 00:00:00 2001 From: Pascal Sommer Date: Tue, 30 Jan 2018 23:13:02 +0100 Subject: [PATCH] Implement ArrayAccess for FeedItem (#68) * Implement ArrayAccess for FeedItem * Revert ArrayAccess, fix lastUpdated order --- src/Feed.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Feed.php b/src/Feed.php index 0115546..84e3f95 100644 --- a/src/Feed.php +++ b/src/Feed.php @@ -91,6 +91,8 @@ protected function lastUpdated(): string return ''; } - return $this->items->sortBy('updated')->last()->updated->toAtomString(); + return $this->items->sortBy(function ($feedItem) { + return $feedItem->updated; + })->last()->updated->toAtomString(); } }