File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Configuration
2
+
3
+ The published configuration file (` config/importer.php ` ) contains 2 arrays: ` importers ` and ` runners ` .
4
+ Both arrays should contain a key ` default ` , which is the key that will be used when no specific importer/runner is specified.
5
+
6
+ ## Example:
7
+
8
+ ``` php
9
+ return [
10
+ /***********************************************************
11
+ * Importers are used for defining specific import tasks
12
+ * For instance, a ProductImporter could import a file with
13
+ * products into a table.
14
+ ***********************************************************/
15
+ 'importers' => [
16
+ 'default' => App\Importers\ProductImporter::class,
17
+ 'user' => App\Importers\UserImporter::class
18
+ ],
19
+
20
+ /***********************************************************
21
+ * Runners are used for looping through the file
22
+ * The default is a CSV runner which will loop though
23
+ * CSV files line-by-line. A runner uses an importer to get
24
+ * import specific settings like the model class.
25
+ ***********************************************************/
26
+ 'runners' => [
27
+ 'default' => \Luna\Importer\Runners\CsvRunner::class
28
+ 'xml' => App\Runners\XmlRunner::class
29
+ ]
30
+ ];
31
+ ```
You can’t perform that action at this time.
0 commit comments