We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51fa5b3 commit 60c9dfbCopy full SHA for 60c9dfb
docs/usage.md
@@ -0,0 +1,36 @@
1
+# Usage
2
+
3
+Let's assume the configuration has a runner defined as `xml` and an importer as `product` like so:
4
5
+```php
6
+return [
7
+ 'importers' => [
8
+ ...
9
+ 'product' => App\Importers\ProductImporter::class
10
11
+ ],
12
+ 'runners' => [
13
14
+ 'xml' => App\Runners\XmlRunner::class
15
16
+ ]
17
+];
18
+```
19
20
+We can then run the import with the included `Import` facade.
21
22
23
+ // Using the key in the config
24
+ \Import::runner('xml')->importer('product')->run();
25
26
+ // OR
27
28
+ // Creating new instances
29
+ \Import::runner(new XmlRunner)->importer(new ProductImporter)->run();
30
31
32
+If no runner and/or importer is specified, the `default` will be used.
33
34
35
+ \Import::run();
36
0 commit comments