承接 thujohn/rss 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thujohn/rss

最新稳定版本:1.0.3

Composer 安装命令:

composer require thujohn/rss

包简介

RSS builder for Laravel 4

README 文档

README

RSS builder for Laravel 4

Build Status

Installation

Add thujohn/rss to composer.json.

"thujohn/rss": "~1.0"

Run composer update to pull down the latest version of RSS.

Now open up app/config/app.php and add the service provider to your providers array.

'providers' => array(
    'Thujohn\Rss\RssServiceProvider',
)

Now add the alias.

'aliases' => array(
    'Rss' => 'Thujohn\Rss\RssFacade',
)

Usage

Returns the feed

Route::get('/', function()
{
	$feed = Rss::feed('2.0', 'UTF-8');
	$feed->channel(array('title' => 'Channel\'s title', 'description' => 'Channel\'s description', 'link' => 'http://www.test.com/'));
	for ($i=1; $i<=5; $i++){
		$feed->item(array('title' => 'Item '.$i, 'description|cdata' => 'Description '.$i, 'link' => 'http://www.test.com/article-'.$i));
	}

	return Response::make($feed, 200, array('Content-Type' => 'text/xml'));
});

Save the feed

Route::get('/', function()
{
	$feed = Rss::feed('2.0', 'UTF-8');
	$feed->channel(array('title' => 'Channel\'s title', 'description' => 'Channel\'s description', 'link' => 'http://www.test.com/'));
	for ($i=1; $i<=5; $i++){
		$feed->item(array('title' => 'Item '.$i, 'description|cdata' => 'Description '.$i, 'link' => 'http://www.test.com/article-'.$i));
	}

	$feed->save('test.xml');
});

统计信息

  • 总下载量: 129.69k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 73
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 70
  • Watchers: 6
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-07-04