Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronhuisinga committed Apr 28, 2021
1 parent 63505c4 commit 9caf630
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@
"psr-4": {
"CraftCodery\\Searchable\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"CraftCodery\\Searchable\\SearchableServiceProvider"
]
}
}
}
18 changes: 15 additions & 3 deletions src/SearchableServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,20 @@ class SearchableServiceProvider extends ServiceProvider
{
public function boot()
{
$configPath = __DIR__ . '/../config/searchable.php';
$this->publishes([$configPath => config_path('searchable.php')]);
$this->mergeConfigFrom($configPath, 'searchable');
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__ . '/../config/searchable.php' => config_path('searchable.php'),
], 'searchable-config');
}
}

/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->mergeConfigFrom(__DIR__ . '/../config/searchable.php', 'searchable');
}
}

0 comments on commit 9caf630

Please sign in to comment.