From 6fd8391d8774a217164ff135e1143cd5cafe3af7 Mon Sep 17 00:00:00 2001 From: Petrov Dmitriy <8kolos8@mail.ru> Date: Wed, 16 Feb 2022 13:28:46 +0300 Subject: [PATCH] Update FlashAlert.php if there are several messages of the same type, the identifier is duplicated --- src/FlashAlert.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FlashAlert.php b/src/FlashAlert.php index 918c545..8a343a8 100644 --- a/src/FlashAlert.php +++ b/src/FlashAlert.php @@ -59,7 +59,7 @@ public function run() 'body' => $message, 'closeButton' => $this->closeButton, 'options' => array_merge($this->options, [ - 'id' => $this->getId().'-'.$type.'-'.$appendClass, + 'id' => $this->getId().'-'.$type.'-'.$i, 'class' => $this->alertTypes[$type].$appendClass ]) ]); @@ -68,4 +68,4 @@ public function run() $session->removeFlash($type); } } -} \ No newline at end of file +}