Skip to content

Commit

Permalink
Don't require a config & default enabled if installed
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmypuckett committed Apr 8, 2024
1 parent 5f800e8 commit 43f2078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VersionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class VersionServiceProvider extends ServiceProvider
*/
public function boot()
{
if ($this->app['config']->get('version.route.enabled')) {
if ($this->app['config']->get('version.route.enabled', true)) {
$this->app['router']->group(
[
'namespace' => 'Spinen\Version\Http\Controllers',
Expand All @@ -37,7 +37,7 @@ function (Router $router) {
);
}

if ($this->app['config']->get('version.view.enabled')) {
if ($this->app['config']->get('version.view.enabled', true)) {
$this->app['view']->composer(
$this->app['config']->get('version.view.views', '*'),
function ($view) {
Expand Down

0 comments on commit 43f2078

Please sign in to comment.