Skip to content

Commit

Permalink
Update README.md (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctf0 authored and freekmurze committed Aug 15, 2018
1 parent 532af5a commit 8def4bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,20 @@ If you prefer, returning an associative array with the necessary keys will do th

use Illuminate\Database\Eloquent\Model;
use Spatie\Feed\Feedable;
use Spatie\Feed\FeedItem;

class NewsItem extends Model implements Feedable
{
public function toFeedItem()
{
return [
return FeedItem::create([
'id' => $this->id,
'title' => $this->title,
'summary' => $this->summary,
'updated' => $this->updated_at,
'link' => $this->link,
'author' => $this->author,
];
]);
}
}
```
Expand Down

0 comments on commit 8def4bb

Please sign in to comment.