Skip to content

Commit

Permalink
fix: High availability sync module updated notification overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed Jul 10, 2023
1 parent 81d20ad commit d4f65f4
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions routes/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,11 @@
$flag = Module::where(['name' => $module_name])->exists();

if (! $flag) {
$module = Module::create(['name' => $module_name, 'enabled' => true]);

$notification = new AdminNotification([
'title' => 'Yeni Modül Eklendi',
'type' => 'new_module',
'message' => "$module_name isminde bir modül sisteme eklendi.",
'level' => 3,
]);
Module::create(['name' => $module_name, 'enabled' => true]);
} else {
Module::where(['name' => $module_name])->first()->touch();

$notification = new AdminNotification([
'title' => $module_name.' modülü güncellendi.',
'type' => 'new_module',
'message' => "$module_name isminde bir modül güncellendi.",
'level' => 3,
]);
}

$notification->save();
$this->info('Modül başarıyla yüklendi.');
})->describe('New module add');

Expand Down

0 comments on commit d4f65f4

Please sign in to comment.