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

to_array() returns error on get() #47

Closed
DregondRahl opened this issue Jun 11, 2011 · 1 comment
Closed

to_array() returns error on get() #47

DregondRahl opened this issue Jun 11, 2011 · 1 comment
Labels

Comments

@DregondRahl
Copy link

to_array() doesn't seem to work when using get() method for a model, since it returns an array of objects, get_one() however works.

ErrorException [ Error ]: Call to a member function to_array() on a non-object
@jschreuder
Copy link
Contributor

to_array() turns a model into an array which can be chained after get_one().

get() however returns an array and not a model instance, thus chaining to_array() on array output will give you that error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants