You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proper solution found in #2 where a new function addErrors was added which will add the errors to the global $errors instead of to a named local property with the same name.
There is an existing
view
methodwithErrors
that is used like this:but the problem is that the errors are available as
$errors
only in the provided view, meaning two things:$errors
used by validation and the method with same namewithErrors()
on redirectsI wrote a PR for this that was unfortunately rejected - see laravel/framework#39459
So this issue is about creating a macro
withGlobalErrors
that merges the errors to the global errors:This is how to merge: https://laravel.com/api/8.x/Illuminate/Support/MessageBag.html#method_merge
The text was updated successfully, but these errors were encountered: