Anahkiasen/former — pull request #94 by dfeng (2013-03-19 12:14:38+00:00)
Title: fix fromQuery with __toString methods

[Agnostic]

I was using `Former::select('topic')->fromQuery(Topic::all())` where in my Topic.php model, I had __toString() defined.

But in your `queryToArray()` function, you convert Topic::all() into an array (using toArray()), which destroys all the methods (I think), hence when you try `method_exists($model, '__toString')`, it returns `false`.

I can't think of any time you'd want to apply toArray() to a Collection, so I just combined the two if statements.

P.S. I had a look at your tests, and I don't understand how to make tests, sorry. The relevant method is `testSelectEloquentMagicMethods`, but I think perhaps it's not reconstructing an Eloquent model exactly? (hence it passes the test).

Sorry, this is my first pull request :P