mcstutterfish/fbia-rss
Facebook Instant Articles RSS Builder (with Laravel 4 Service Provider)
288
2
| Install | |
|---|---|
composer require mcstutterfish/fbia-rss |
|
| Latest Version: | 0.1.11 |
| PHP: | >=5.3.0 |
| Laravel: | 4 · 5 |
| License: | MIT |
| Last Updated: | Jul 27, 2016 |
| Links: | GitHub · Packagist |
Maintainer: mcstutterfish
FBIARss
Facebook Instant Articles RSS builder for Laravel 4
Installation
Add mcstutterfish/fbia-rss to composer.json.
"mcstutterfish/fbia-rss": "~1.0"
Run composer update to pull down the latest version of FBIARss.
Now open up app/config/app.php and add the service provider to your providers array.
'providers' => array(
'FBIARss\FBIARssServiceProvider',
)
Now add the alias.
'aliases' => array(
'FBIARss' => 'FBIARss\FBIARssFacade',
)
Usage
Returns the feed
Route::get('/', function()
{
$feed = FBIARss::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 = FBIARss::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');
});
Related Packages
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 0.1.11 | >=5.3.0 | 4.*| | MIT | |
| 0.1.10 | >=5.3.0 | 4.*| | MIT | |
| 0.1.9 | >=5.3.0 | 4.*| | MIT | |
| 0.1.8 | >=5.3.0 | 4.*| | MIT | |
| 0.1.7 | >=5.3.0 | 4.*| | MIT | |
| 0.1.6 | >=5.3.0 | 4.*| | MIT | |
| 0.1.5 | >=5.3.0 | 4.*| | MIT | |
| 0.1.4 | >=5.3.0 | 4.*| | MIT | |
| 0.1.3 | >=5.3.0 | 4.*| | MIT | |
| 0.1.2 | >=5.3.0 | 4.*| | MIT | |
| 0.1.1 | >=5.3.0 | 4.*| | MIT |