|
9 | 9 | * |
10 | 10 | * This file defines how feeds are generated and presented, including |
11 | 11 | * formatting, persistence, scheduling, console UX and value transformers. |
12 | | - * Adjust the options below or override them via environment variables. |
| 12 | + * Adjust the options below according to your application needs. |
13 | 13 | */ |
14 | 14 | return [ |
15 | 15 | /** |
16 | 16 | * Pretty-print the generated feed output. |
17 | 17 | * |
18 | 18 | * When enabled, the resulting XML/JSON will include indentation and |
19 | | - * human‑friendly formatting. Disable for slightly smaller payload size. |
20 | | - * |
21 | | - * Default: false |
| 19 | + * human‑friendly formatting. Disable to reduce payload size. |
22 | 20 | */ |
23 | 21 | 'pretty' => (bool) env('FEED_PRETTY', false), |
24 | 22 |
|
25 | 23 | /** |
26 | | - * Output format options. |
| 24 | + * Output date/time options. |
27 | 25 | */ |
28 | | - 'formats' => [ |
| 26 | + 'date' => [ |
29 | 27 | /** |
30 | 28 | * Date/time format used when serializing timestamps to feeds. |
31 | | - * You may use any PHP date format constant, e.g. DATE_ATOM, DATE_RFC3339 |
32 | | - * or a custom PHP date() format string. |
33 | | - * |
34 | | - * Default: DATE_ATOM |
| 29 | + * Accepts any valid PHP date/time format string or constant. |
35 | 30 | */ |
36 | | - 'date' => DATE_ATOM, |
| 31 | + 'format' => DATE_ATOM, |
| 32 | + |
| 33 | + /** |
| 34 | + * The timezone applied when formatting dates. |
| 35 | + */ |
| 36 | + 'timezone' => env('FEED_TIMEZONE', 'UTC'), |
37 | 37 | ], |
38 | 38 |
|
39 | 39 | /** |
40 | | - * Database table settings used by the package (e.g., for generation logs or state). |
| 40 | + * Database table settings used by the package (for logs or internal state). |
41 | 41 | */ |
42 | 42 | 'table' => [ |
43 | 43 | /** |
44 | 44 | * The database connection name to use. |
45 | | - * |
46 | | - * Should match a connection defined in config/database.php under |
47 | | - * the "connections" array. |
48 | | - * |
49 | | - * Default: sqlite |
| 45 | + * Should match a connection defined in config/database.php. |
50 | 46 | */ |
51 | 47 | 'connection' => env('DB_CONNECTION', 'sqlite'), |
52 | 48 |
|
53 | 49 | /** |
54 | 50 | * The database table name used by the package. |
55 | | - * |
56 | | - * Default: feeds |
57 | 51 | */ |
58 | 52 | 'table' => env('FEED_TABLE', 'feeds'), |
59 | 53 | ], |
|
63 | 57 | */ |
64 | 58 | 'schedule' => [ |
65 | 59 | /** |
66 | | - * Time To Live (in minutes) for the schedule lock or cache. |
67 | | - * |
68 | | - * Controls how frequently a scheduled job may be executed to avoid |
69 | | - * overlapping or excessively frequent runs. |
70 | | - * |
71 | | - * Default: 1440 (24 hours) |
| 60 | + * Time-to-live (in minutes) for the schedule lock or cache. |
| 61 | + * Helps prevent overlapping or excessively frequent runs. |
72 | 62 | */ |
73 | 63 | 'ttl' => (int) env('FEED_SCHEDULE_TTL', 1440), |
74 | 64 |
|
75 | 65 | /** |
76 | 66 | * Run scheduled jobs in the background. |
77 | | - * |
78 | | - * When true, tasks will be dispatched to run asynchronously so they do |
79 | | - * not block the current process. Set to false to run in the foreground. |
80 | | - * |
81 | | - * Default: true |
| 67 | + * When true, tasks are dispatched asynchronously to avoid blocking. |
82 | 68 | */ |
83 | 69 | 'background' => (bool) env('FEED_SCHEDULE_RUN_BACKGROUND', true), |
84 | 70 | ], |
|
88 | 74 | */ |
89 | 75 | 'console' => [ |
90 | 76 | /** |
91 | | - * Enables a progress bar when generating feeds in the console. |
92 | | - * |
93 | | - * When set to true, the feed:generate command will display a |
94 | | - * progress bar showing the execution progress. |
95 | | - * |
96 | | - * Default: false |
| 77 | + * Show a progress bar when generating feeds in the console. |
97 | 78 | */ |
98 | 79 | 'progress_bar' => (bool) env('FEED_CONSOLE_PROGRESS_BAR_ENABLED', false), |
99 | 80 | ], |
|
105 | 86 | * |
106 | 87 | * You may add your own transformers by implementing |
107 | 88 | * `DragonCode\LaravelFeed\Contracts\Transformer` and registering the class |
108 | | - * here, or publish a stub via the package's make command if available. |
| 89 | + * here. |
109 | 90 | */ |
110 | 91 | 'transformers' => [ |
111 | 92 | Transformers\BoolTransformer::class, |
|
128 | 109 |
|
129 | 110 | 'jsonl' => [ |
130 | 111 | /** |
131 | | - * JSON encoding flags used when exporting feeds to JSON. |
132 | | - * |
133 | | - * The JSON_PRETTY_PRINT option is not available for JSON Lines files and will be ignored. |
| 112 | + * JSON encoding flags used when exporting feeds to JSON Lines format. |
| 113 | + * Pretty print is ignored for JSON Lines. |
134 | 114 | */ |
135 | 115 | 'options' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE, |
136 | 116 | ], |
|
0 commit comments