PHP code example of yaroslawww / laravel-external-feed-parser
1. Go to this page and download the library: Download yaroslawww/laravel-external-feed-parser 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/ */
yaroslawww / laravel-external-feed-parser example snippets
'jobs-feeds' => [
'foobar' => [
'pull' => [
'class' => \ExternalFeedParser\Pull\XmlFeedPull::class,
'options' => [
'url' => 'https://www.foobar.co.uk/rssfeed/example.aspx',
'listingKey' => 'baz',
],
],
'convert' => [
'class' => \ExternalFeedParser\Converters\SimpleConverter::class,
'options' => [
'entityClass' => \ExternalFeedParser\Entity\ExternalEntity::class,
],
],
],
],
FeedParser::provider('foobar')
->parse()
->each(function (ExternalEntity $entity) {
$entity->get('baz')
});
shell
php artisan vendor:publish --provider="ExternalFeedParser\ServiceProvider" --tag="config"