This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Display the specified blog post. | |
*/ | |
public function show($slug) | |
{ | |
$post = Post::where('slug', $slug)->first(); | |
return View::make('blog.post', compact('post')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("includes/init.php"); | |
// instantiate blog class | |
$blog = new Blog($db); | |
$posts = $blog->get_posts(); | |
$lastpostdate = $blog->last_post_date(); | |
header("Content-Type: application/xml; charset=UTF-8"); | |
echo '<?xml version="1.0" encoding="UTF-8" ?>' . | |
'<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">'. | |
'<channel>' . |
NewerOlder