1. Go to this page and download the library: Download dotzecker/larafeed library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dotzecker / larafeed example snippets
use DotZecker\Larafeed\Larafeed as Feed;
$feed = Feed::make(
'atom',
[
'title' => 'My cool blog about my super afro hair',
'link' => 'http://rafa.im',
'lang' => 'en',
'feedLink' => 'http://rafa.im/blog/feed',
'logo' => 'http://rafa.im/images/logo.png',
'icon' => 'http://rafa.im/favicon.ico',
'description' => "I'm super awesome and I like to code, do you?"
]
);
use DotZecker\Larafeed\Larafeed as Feed;
$feed = Feed::make('atom');
$feed->title = 'My cool blog about my super afro hair';
$feed->link = 'http://rafa.im';
$feed->description = "I don't say 'Hello World', the World says 'Hello Rafa' to me!";
// Only with the name
$feed->addAuthor('Rafael Antonio');
// With full info
$feed->addAuthor(
[
'name' => 'Rafa',
'email' => '[email protected]',
'uri' => 'http://rafa.im'
]
);
$feed->addEntry(
[
'title' => 'Mi primer post',
'link' => 'http://rafa.im/blog/p/los-labels-y-la-usabilidad',
'author' => 'Rafael Antonio Gómez Casas',
'pubDate' => '2013-03-15',
'content' => 'Hola, este es mi primer post, Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nihil, quos, reprehenderit, nemo minus consectetur ipsum molestias cumque voluptatum deserunt impedit totam ab aspernatur rem voluptatibus dolore optio distinctio sequi vero harum neque qui suscipit libero deleniti minima repellat recusandae delectus beatae dignissimos corporis quaerat et nesciunt inventore architecto voluptates voluptatem.'
]
);
$entry = $feed->entry();
$entry->title = 'My super title';
$entry->content = '¿Qué tal? :P Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error, aperiam!';
// $entry->...
$feed->setEntry($entry); // We "inject" the entry
return $feed->render();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.