Skip to content

Commit

Permalink
Move config file
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhamp committed Apr 24, 2022
1 parent c060438 commit 63e726d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/ToolServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function boot()
});

$this->publishes([
__DIR__.'/config.php' => config_path('nova-csv-importer.php')
], 'nova-csv-import');
__DIR__.'/../config/csv-import.php' => config_path('csv-import.php')
], 'csv-import');
}

/**
Expand Down Expand Up @@ -63,18 +63,18 @@ protected function routes()
*/
public function register()
{
$this->mergeConfigFrom(__DIR__.'/config.php', 'nova-csv-importer');
$this->mergeConfigFrom(__DIR__.'/../config/csv-import.php', 'csv-import');

$this->app->when([UploadController::class, ImportController::class])
->needs(Filesystem::class)
->give(function () {
return Storage::disk(config('nova-csv-import.disk'));
return Storage::disk(config('csv-import.disk'));
});

$this->app->when([UploadController::class, ImportController::class])
->needs(ModelImporter::class)
->give(function () {
$class = $this->app['config']->get('nova-csv-importer.importer');
$class = $this->app['config']->get('csv-importer.importer');

$importable = \Maatwebsite\Excel\Concerns\Importable::class;

Expand Down

0 comments on commit 63e726d

Please sign in to comment.