Skip to content

Commit fc289d8

Browse files
committed
fix: patch up multi flash issue
1 parent f01133c commit fc289d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Flash.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ public static function set($message, string $key = 'default')
4242
$key = static::$config['default'];
4343
}
4444

45-
Session::set(static::$config['key'], [$key => $message]);
45+
Session::set(static::$config['key'], array_merge(
46+
Session::get(static::$config['key']) ?? [],
47+
[$key => $message]
48+
));
4649
}
4750

4851
/**

0 commit comments

Comments
 (0)