diff --git a/src/MsTeamsChannel.php b/src/MsTeamsChannel.php index 15183a0..edf775d 100644 --- a/src/MsTeamsChannel.php +++ b/src/MsTeamsChannel.php @@ -46,10 +46,10 @@ public function send($notifiable, Notification $notification) } $code = collect(Arr::get($data, 'code', [])) - ->map(function ($code){ + ->map(function ($code) { return [ - "name" => "Code", - "value" => "
$code" + 'name' => 'Code', + 'value' => "
$code", ]; }); @@ -73,19 +73,19 @@ public function send($notifiable, Notification $notification) }); $payload = [ - "@type" => "MessageCard", - "@context" => "http://schema.org/extensions", - "summary" => Arr::get($data, 'title', 'Incoming notification'), - "themeColor" => $this->getNotificationType(Arr::get($data, 'type', 'success')), - "title" => Arr::get($data, 'title'), + '@type' => 'MessageCard', + '@context' => 'http://schema.org/extensions', + 'summary' => Arr::get($data, 'title', 'Incoming notification'), + 'themeColor' => $this->getNotificationType(Arr::get($data, 'type', 'success')), + 'title' => Arr::get($data, 'title'), - "sections" => [ + 'sections' => [ [ - "activitySubtitle" => sprintf("%s : (%s)",config('app.url'), config('app.env')), - "text" => Arr::get($data, 'text'), - "facts" => $code, - "images" => $images, - ] + 'activitySubtitle' => sprintf('%s : (%s)', config('app.url'), config('app.env')), + 'text' => Arr::get($data, 'text'), + 'facts' => $code, + 'images' => $images, + ], ], 'potentialAction' => $potentialActions, @@ -112,7 +112,7 @@ public function send($notifiable, Notification $notification) */ private function getNotificationType($type = 'info') : string { - switch($type){ + switch ($type) { case 'error': return '#D8000C'; break;