Skip to content

Commit

Permalink
Allow users to modify the default config values (#21)
Browse files Browse the repository at this point in the history
* Separate config for alert and confirm

* Allow users to modify the default config values
  • Loading branch information
jantinnerezo authored Dec 27, 2020
1 parent fce150d commit 4541ad5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/LivewireAlertServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public function boot()
$this->registerAlertMacro();
$this->registerFlashMacro();
$this->registerConfirmMacro();
$this->registerPublishables();
}

protected function registerViews()
Expand Down Expand Up @@ -76,6 +77,15 @@ public function registerConfirmMacro()
});
}

public function registerPublishables()
{
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__ . '/../config/config.php' => config_path('livewire-alert.php'),
], 'config');
}
}

/**
* Register the application services.
*/
Expand Down

0 comments on commit 4541ad5

Please sign in to comment.