Skip to main content
Version: 1.x

Configuration reference

Publish config/feeds.php with php artisan vendor:publish --tag="feeds". Environment values are read when Laravel builds the configuration cache.

Core settings​

KeyDefaultPurpose
modelDragonCode\LaravelFeed\Models\FeedEloquent model used for feed registrations. A replacement must extend the package model.
pretty / FEED_PRETTYfalseEnables formatted XML and JSON output.
date.formatDATE_ATOMPHP date format used by the date transformer.
date.timezone / FEED_TIMEZONEUTCTimezone used while serializing dates.
table.connectionDB_CONNECTION, then sqliteDatabase connection for feed registrations.
table.table / FEED_TABLEfeedsFeed registration table name.

Scheduling and queues​

Environment variableDefaultPurpose
FEED_SCHEDULE_TTL1440Schedule lock lifetime in minutes.
FEED_SCHEDULE_RUN_BACKGROUNDtrueRuns scheduled feed commands in the background.
FEED_QUEUE_ENABLEDfalseDispatches generation through Laravel Queue.
FEED_QUEUE_CONNECTIONQUEUE_CONNECTION, then databaseQueue connection for feed jobs.
FEED_QUEUE_NAMEConnection defaultQueue name.
FEED_QUEUE_UNIQUE_TTL3600Unique job lock lifetime in seconds.
FEED_CONSOLE_PROGRESS_BAR_ENABLEDfalseDisplays the console progress bar.

Queue mode requires a worker when the selected connection is asynchronous. The sync connection still runs generation in the command process.

Transformers​

The default pipeline contains BoolTransformer, DateTimeTransformer, and EnumTransformer in that order. Each matching transformer receives the value returned by the previous transformer.

Add a custom class to transformers after implementing DragonCode\LaravelFeed\Contracts\Transformer. Laravel resolves the class through the service container.

Converter settings​

KeyDefault
converters.json.options`JSON_UNESCAPED_SLASHES
converters.jsonl.options`JSON_UNESCAPED_SLASHES
converters.csv.delimiter;
converters.csv.enclosure"
converters.csv.escapeEmpty string
converters.csv.line_endingPHP_EOL

These values are application-wide defaults. Override them for one feed with per-feed converter options, using constructor parameter names such as lineEnding instead of configuration keys such as line_ending.

See Also​