Skip to content

Instantly share code, notes, and snippets.

@nobodyplace
Last active July 15, 2019 13:07
Show Gist options
  • Select an option

  • Save nobodyplace/13920d40a0d834d2516341fa064ddff9 to your computer and use it in GitHub Desktop.

Select an option

Save nobodyplace/13920d40a0d834d2516341fa064ddff9 to your computer and use it in GitHub Desktop.
<?php
$feed = App::make('feed');
$feed->title = 'Title';
$feed->description = 'Description;
$feed->logo = 'Logo';
$feed->link = url('tag');
$feed->setDateFormat('carbon');
$feed->pubdate = $posts[0]->created;
$feed->lang = 'ja';
foreach ($posts as $post) {
$feed->add(
$post->title
,$post->author
,$post->permalink
,$post->created
,$post->description
,$post->content
);
}
return $feed->render('rss');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment