private function fillFeed(Feed $feed)
 {
     $posts = app(ContentRepository::class)->posts();
     $feed->title = 'Sebastian De Deyne';
     $feed->description = 'Full-stack developer working at Spatie in Antwerp, Belgium';
     $feed->link = request()->url();
     $feed->setDateFormat('datetime');
     $feed->pubdate = $posts->first() ? $posts->first()->date : Carbon::now();
     $feed->lang = 'en';
     $feed->setShortening(false);
     $posts->each(function (Article $post) use($feed) {
         $feed->add($post->title, 'Sebastian De Deyne', $post->url, $post->date, string($post->contents)->tease(140), $post->contents);
     });
 }
예제 #2
0
 /**
  * Adds an item to the feed.
  *
  * @param \CachetHQ\Cachet\Models\Incident $incident
  * @param bool                             $isRss
  */
 private function feedAddItem(Incident $incident, $isRss)
 {
     $this->feed->add($incident->name, Config::get('setting.app_name'), Str::canonicalize(route('incident', ['id' => $incident->id])), $isRss ? $incident->created_at->toRssString() : $incident->created_at->toAtomString(), $isRss ? $incident->message : Markdown::convertToHtml($incident->message));
 }
예제 #3
0
 /**
  * Check if feed is cached
  *
  * @return bool 
  * @static 
  */
 public static function isCached()
 {
     return \Roumen\Feed\Feed::isCached();
 }