greggilbert / recaptcha

[ABANDONED] reCAPTCHA Validator for Laravel 5
MIT License
713 stars 196 forks source link

Recaptcha::render() should not return a view that is cast to a string #105

Open lrathbun opened 8 years ago

lrathbun commented 8 years ago

Recaptcha::render() should return the rendered view (a string):

return app('view')->make($view, $data)->render();

rather than the view (which will be cast to a string with __toString() ):

return app('view')->make($view, $data);

The difference is in the error reporting. The former gives an informative error message, the later does not.

See this StackOverflow question for a little more info.