File tree 1 file changed +11
-13
lines changed
1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change 8
8
9
9
class AbuseIPServiceProvider extends ServiceProvider
10
10
{
11
+ /**
12
+ * The config source path.
13
+ *
14
+ * @var string
15
+ */
16
+ protected $ config = __DIR__ . '/../config/abuseip.php ' ;
17
+
11
18
public function boot ()
12
19
{
13
20
$ this ->publishes ([
14
- __DIR__ . '/../config/abuseip.php ' => config_path ('abuseip.php ' ),
21
+ __DIR__ . '/../config/abuseip.php ' => config_path ('abuseip.php ' ),
15
22
], 'laravel-abuse-ip ' );
16
23
17
24
$ this ->publishes ([
18
- __DIR__ . '/../abuseip.json ' => storage_path ( ' framework/ abuseip.json ' ),
25
+ __DIR__ . '/../abuseip.json ' => config ( ' abuseip.storage ' ),
19
26
], 'laravel-abuse-ip ' );
20
27
21
- $ this ->mergeConfigFrom (
22
- __DIR__ .'/../config/abuseip.php ' , 'abuseip '
23
- );
24
-
25
- if ($ this ->app ->runningInConsole ()){
28
+ if ($ this ->app ->runningInConsole ()) {
26
29
$ this ->commands ([
27
30
UpdateAbuseIps::class,
28
31
]);
29
32
}
30
33
31
34
$ this ->app ['router ' ]->aliasMiddleware ('abuse_ip ' , AbuseIp::class);
32
-
33
-
34
35
}
35
36
36
37
public function register ()
37
38
{
38
39
39
- // $this->mergeConfigFrom(
40
- // __DIR__.'/../config/abuseip.php', 'abuseip'
41
- // );
40
+ $ this ->mergeConfigFrom ($ this ->config , 'abuseip ' );
42
41
// $this->app['router']->aliasMiddleware('block.abuse_ip', \RApp\Http\Middleware\AbuseIp::class);
43
42
}
44
-
45
43
}
You can’t perform that action at this time.
0 commit comments