@@ -30,6 +30,14 @@ private function load()
3030 }
3131
3232 private function publish ()
33+ {
34+ $ this ->publishConfig ()
35+ ->publishFactories ()
36+ ->publishExamples ()
37+ ->publishEmailViews ();
38+ }
39+
40+ private function publishConfig ()
3341 {
3442 $ this ->publishes ([
3543 __DIR__ .'/config ' => config_path ('enso ' ),
@@ -39,6 +47,11 @@ private function publish()
3947 __DIR__ .'/config ' => config_path ('enso ' ),
4048 ], 'enso-config ' );
4149
50+ return $ this ;
51+ }
52+
53+ private function publishFactories ()
54+ {
4255 $ this ->publishes ([
4356 __DIR__ .'/database/factories ' => database_path ('factories ' ),
4457 ], 'data-import-factory ' );
@@ -47,18 +60,30 @@ private function publish()
4760 __DIR__ .'/database/factories ' => database_path ('factories ' ),
4861 ], 'enso-factories ' );
4962
50- $ this ->publishes ([
51- __DIR__ .'/../stubs/Imports/Importers/ExampleImporter.stub ' => app_path ('Imports/Importers/ExampleImporter.php ' ),
52- __DIR__ .'/../stubs/Imports/Templates/exampleTemplate.stub ' => app_path ('Imports/Templates/exampleTemplate.json ' ),
53- __DIR__ .'/../stubs/Imports/Validators/CustomValidator.stub ' => app_path ('Imports/Validators/CustomValidator.php ' ),
54- ], 'data-import-examples ' );
63+ return $ this ;
64+ }
5565
66+ private function publishEmailViews ()
67+ {
5668 $ this ->publishes ([
5769 __DIR__ .'/resources/views ' => resource_path ('views/vendor/laravel-enso/data-import ' ),
5870 ], 'data-import-mail ' );
5971
6072 $ this ->publishes ([
6173 __DIR__ .'/resources/views ' => resource_path ('views/vendor/laravel-enso/data-import ' ),
6274 ], 'enso-mail ' );
75+
76+ return $ this ;
77+ }
78+
79+ private function publishExamples ()
80+ {
81+ $ this ->publishes ([
82+ __DIR__ .'/../stubs/Imports/Importers/ExampleImporter.stub ' => app_path ('Imports/Importers/ExampleImporter.php ' ),
83+ __DIR__ .'/../stubs/Imports/Templates/exampleTemplate.stub ' => app_path ('Imports/Templates/exampleTemplate.json ' ),
84+ __DIR__ .'/../stubs/Imports/Validators/CustomValidator.stub ' => app_path ('Imports/Validators/CustomValidator.php ' ),
85+ ], 'data-import-examples ' );
86+
87+ return $ this ;
6388 }
6489}
0 commit comments