wip
This commit is contained in:
1 parent
004e87e6b5
commit
a6c4e54983
3 files changed
+22
-22
No files matched your search
@@ -60,7 +60,7 @@ class NotifyAlarms
|
||||
$send = StoreSend::store($event_id, $user_id, $bookmaker_id, $alarm_level_id, $fieldname, 'notify_by_mail');
|
||||
|
||||
$message = 'ALARM LEVEL '.$alarm_level_id;
|
||||
$table = [
|
||||
$tablecontent = [
|
||||
['key' => 'League', 'value' => $event->competition_group->name],
|
||||
['key' => 'Event', 'value' => $event->home.' vs '.$event->away],
|
||||
['key' => 'Startime', 'value' => $event->starttime],
|
||||
@@ -71,7 +71,7 @@ class NotifyAlarms
|
||||
];
|
||||
|
||||
Mail::to($user)
|
||||
->send(new AlarmNotification($message, $table));
|
||||
->send(new AlarmNotification($message, $tablecontent));
|
||||
|
||||
}
|
||||
$stored_alarms[] = $send;
|
||||
|
||||
@@ -14,16 +14,16 @@ class AlarmNotification extends Mailable
|
||||
|
||||
protected string $message;
|
||||
|
||||
protected string $table;
|
||||
protected string $tablecontent;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*/
|
||||
public function __construct($message, $table)
|
||||
public function __construct($message, $tablecontent)
|
||||
{
|
||||
$this->message = $message;
|
||||
|
||||
$this->table = $table;
|
||||
$this->tablecontent = $tablecontent;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ class AlarmNotification extends Mailable
|
||||
return new Content(
|
||||
markdown: 'mail.user.alarm',
|
||||
with: [
|
||||
'table' => $this->table,
|
||||
'tablecontent' => $this->tablecontent,
|
||||
'message' => $this->message,
|
||||
],
|
||||
);
|
||||
|
||||
@@ -4,30 +4,30 @@
|
||||
<br><br>
|
||||
{{ $message }}
|
||||
|
||||
<x-mail::table>
|
||||
<x-mail::tablecontent>
|
||||
|
||||
{{ $table[0]['key'] }}
|
||||
${{ $table[0]['value'] }}
|
||||
{{ $tablecontent[0]['key'] }}
|
||||
${{ $tablecontent[0]['value'] }}
|
||||
|
||||
{{ $table[1]['key'] }}
|
||||
${{ $table[1]['value'] }}
|
||||
{{ $tablecontent[1]['key'] }}
|
||||
${{ $tablecontent[1]['value'] }}
|
||||
|
||||
{{ $table[2]['key'] }}
|
||||
${{ $table[2]['value'] }}
|
||||
{{ $tablecontent[2]['key'] }}
|
||||
${{ $tablecontent[2]['value'] }}
|
||||
|
||||
{{ $table[3]['key'] }}
|
||||
${{ $table[3]['value'] }}
|
||||
{{ $tablecontent[3]['key'] }}
|
||||
${{ $tablecontent[3]['value'] }}
|
||||
|
||||
{{ $table[4]['key'] }}
|
||||
${{ $table[4]['value'] }}
|
||||
{{ $tablecontent[4]['key'] }}
|
||||
${{ $tablecontent[4]['value'] }}
|
||||
|
||||
{{ $table[5]['key'] }}
|
||||
${{ $table[5]['value'] }}
|
||||
{{ $tablecontent[5]['key'] }}
|
||||
${{ $tablecontent[5]['value'] }}
|
||||
|
||||
{{ $table[6]['key'] }}
|
||||
${{ $table[6]['value'] }}
|
||||
{{ $tablecontent[6]['key'] }}
|
||||
${{ $tablecontent[6]['value'] }}
|
||||
|
||||
</x-mail::table>
|
||||
</x-mail::tablecontent>
|
||||
|
||||
Thanks,<br>
|
||||
Alarm Monitoring Team
|
||||
|
||||
Reference in new issue
Block a user