Sort out web syndication feeds, and add JSON feeds, fixes issue #52
This commit is contained in:
parent
b234e2133b
commit
e848486b33
11 changed files with 301 additions and 41 deletions
|
@ -51,19 +51,4 @@ class ArticlesController extends Controller
|
|||
|
||||
return redirect($article->link);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the RSS feed.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function makeRSS()
|
||||
{
|
||||
$articles = Article::where('published', '1')->orderBy('updated_at', 'desc')->get();
|
||||
$buildDate = $articles->first()->updated_at->toRssString();
|
||||
|
||||
return response()
|
||||
->view('articles.rss', compact('articles', 'buildDate'), 200)
|
||||
->header('Content-Type', 'application/rss+xml');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue