Skip to content

Commit 65818a1

Browse files
committed
Update package configuration
1 parent 9c1c6b1 commit 65818a1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

config/config.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

33
return [
4-
'enabled' => env('TRAILING_SLASH_ENABLED', true)
4+
/*
5+
* You can turn off this package functionality changing to false this variable
6+
*/
7+
'active' => env('TRAILING_SLASH', true)
58
];

src/LaravelTrailingSlashServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ public function boot()
1818

1919
public function register()
2020
{
21-
$this->app->register(RoutingServiceProvider::class);
21+
$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'laravel-trailing-slash');
22+
23+
if (config('laravel-trailing-slash.active')) {
24+
$this->app->register(RoutingServiceProvider::class);
25+
}
2226
}
2327
}

0 commit comments

Comments
 (0)