We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ca5ea6 commit 0d889d2Copy full SHA for 0d889d2
1 file changed
Store.php
@@ -187,18 +187,19 @@ public function flash(string|array $key, mixed $value = true): void
187
$this->setFlashdata($key, $value);
188
}
189
190
- public function flashErrors(array|string $errors, string $key = 'default'): void
+ public function flashErrors(array|string $errors, string $key = 'default'): array
191
{
192
if (is_string($errors)) {
193
$errors = [$key => $errors];
194
195
196
$_errors = $this->getFlashdata('errors') ?? [];
197
+
198
+ $flashed = array_merge($_errors, $errors);
199
- $this->flash(
- 'errors',
200
- array_merge($_errors, $errors)
201
- );
+ $this->flash('errors', $flashed);
202
+ return $flashed;
203
204
205
/**
0 commit comments