diff --git a/app/Console/Commands/Services/Tasks/Notification/StoreSend.php b/app/Console/Commands/Services/Tasks/Notification/StoreSend.php deleted file mode 100644 index ef496ef1..00000000 --- a/app/Console/Commands/Services/Tasks/Notification/StoreSend.php +++ /dev/null @@ -1,20 +0,0 @@ - $event_id, - 'user_id' => $user_id, - 'bookmaker_id' => $bookmaker_id, - 'alarm_level_id' => $alarm_level_id, - 'fieldname' => $fieldname, - (string) $sendtype => 1, - ]); - } -} diff --git a/app/Console/Commands/Services/Tasks/NotifyAlarms.php b/app/Console/Commands/Services/Tasks/NotifyAlarms.php index 2f669ca5..a0c27385 100644 --- a/app/Console/Commands/Services/Tasks/NotifyAlarms.php +++ b/app/Console/Commands/Services/Tasks/NotifyAlarms.php @@ -5,7 +5,6 @@ namespace App\Console\Commands\Services\Tasks; use App\Console\Commands\Nuh; use App\Console\Commands\Services\Tasks\Notification\CheckSend; use App\Console\Commands\Services\Tasks\Notification\LoadAlarmEvents; -use App\Console\Commands\Services\Tasks\Notification\StoreSend; use App\Mail\AlarmNotification; use App\Models\Bookmaker; use App\Models\Event; @@ -58,7 +57,14 @@ class NotifyAlarms if (! $send) { - $send = StoreSend::store($event_id, $user_id, $bookmaker_id, $alarm_level_id, $fieldname, 'notify_by_mail'); + $send = PersonalNotificationSend::create([ + 'event_id' => $event_id, + 'user_id' => $user_id, + 'bookmaker_id' => $bookmaker_id, + 'alarm_level_id' => $alarm_level_id, + 'fieldname' => $fieldname, + 'notify_by_mail' => 1, + ]); switch ($alarm_level_id) { case 1: @@ -95,7 +101,14 @@ class NotifyAlarms if (! $send) { - $send = StoreSend::store($event_id, $user_id, $bookmaker_id, $alarm_level_id, $fieldname, 'notify_by_system'); + $send = PersonalNotificationSend::create([ + 'event_id' => $event_id, + 'user_id' => $user_id, + 'bookmaker_id' => $bookmaker_id, + 'alarm_level_id' => $alarm_level_id, + 'fieldname' => $fieldname, + 'notify_by_system' => 1, + ]); switch ($alarm_level_id) { case 1: