Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.5] Implement __toString on ViewErrorBag #21605

Merged
merged 2 commits into from
Oct 10, 2017
Merged

Conversation

alepeino
Copy link
Contributor

(Recycling #21078, with better explanation)

The intention here is being able to convert the shared variable $errors to its JSON representation.
It seemed to me that, if __call delegates method calls to the default bag, a __toString implementation should too.

For instance when passing the errors from Blade to a Vue form component, this enables to do just <vue-form :errors="{{ $errors }}">.

@taylorotwell taylorotwell merged commit 7c3be5f into laravel:5.5 Oct 10, 2017
@alepeino alepeino deleted the patch-3 branch October 10, 2017 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants