Skip to content

Commit 85f54af

Browse files
committed
formatting
1 parent d43399a commit 85f54af

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/Config/firewall.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
// 'ip' => '\App\Models\YourIpModel',
1313
],
1414

15-
'unblockip_cron' => [
16-
'enabled' => boolval(env('FIREWALL_UNBLOCKIP_ENABLED', true)),
17-
'cron' => env('FIREWALL_UNBLOCKIP_CRON', '* * * * *'),
15+
'cron' => [
16+
'enabled' => env('FIREWALL_CRON_ENABLED', true),
17+
'expression' => env('FIREWALL_CRON_EXPRESSION', '* * * * *'),
1818
],
19+
1920
'responses' => [
2021

2122
'block' => [

src/Provider.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,9 @@ public function registerCommands()
106106
{
107107
$this->commands(UnblockIp::class);
108108

109-
if (config('firewall.unblockip_cron.enabled', true)) {
109+
if (config('firewall.cron.enabled')) {
110110
$this->app->booted(function () {
111-
app(Schedule::class)
112-
->command('firewall:unblockip')
113-
->cron(config('firewall.unblockip_cron.cron', '* * * * *'));
111+
app(Schedule::class)->command('firewall:unblockip')->cron(config('firewall.cron.expression'));
114112
});
115113
}
116114
}

0 commit comments

Comments
 (0)