Skip to content

[Proposal] Allow raw response of type array to display #74

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

Closed
wants to merge 1 commit into from
Closed

[Proposal] Allow raw response of type array to display #74

wants to merge 1 commit into from

Conversation

helmut
Copy link
Contributor

@helmut helmut commented Jan 17, 2013

Taking a look through the documentation here:
http://four.laravel.com/docs/eloquent#converting-to-arrays-or-json

With examples like:

return User::find(1)->toArray();

I hit the error

UnexpectedValueException: The Response content must be a string or object implementing __toString(), "array" given.

And that made me think that if you can return json why not be able to return an array and see the contents. So I modified the code in response to allow me to simply return an array and then it is displayed on the screen.

Array
(
    [id] => 1
    [name] => John Smith
)

Just playing around really but thought I might share this idea. It probably will break the entire system somehow no doubt.

@helmut
Copy link
Contributor Author

helmut commented Jan 17, 2013

The more I think about this the more I feel it is a useless feature! Think I will close this one myself...

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.

1 participant