diff --git a/app/Models/LibraryItem.php b/app/Models/LibraryItem.php index 2ee84893..2c6d3af9 100644 --- a/app/Models/LibraryItem.php +++ b/app/Models/LibraryItem.php @@ -147,15 +147,15 @@ class LibraryItem extends Model implements HasMedia, Sortable, Feedable public function toFeedItem(): FeedItem { - return FeedItem::create() - ->id($this->id) + ->id('news/'. $this->slug) ->title($this->name) ->enclosure($this->getFirstMediaUrl('main')) ->enclosureLength($this->getFirstMedia('main')->size) ->enclosureType($this->getFirstMedia('main')->mime_type) ->summary($this->excerpt) ->updated($this->updated_at) + ->image($this->getFirstMediaUrl('main')) ->link(url()->route('article.view', ['libraryItem' => $this])) ->authorName($this->lecturer->name); } diff --git a/config/feed.php b/config/feed.php index fb4e5c74..ef18ae83 100644 --- a/config/feed.php +++ b/config/feed.php @@ -27,7 +27,7 @@ return [ * a banner/logo; for RSS and JSON feeds, it's displayed as an icon. * An empty value omits the image attribute from the feed. */ - 'image' => '/img/einundzwanzig.png', + 'image' => asset('img/einundzwanzig.png'), /* * The format of the feed. Acceptable values are 'rss', 'atom', or 'json'.