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(); } }