laravel/framework — pull request #1244 by franzliedke (2013-05-08 22:58:37+00:00)
Title: wrapTable() and wrapColumn()

There is a very small difference between wrapping tables and wrapping columns, when it comes to handling aliases and table prefixes. When I have a column with an alias (AS clause), I don't need to change anything. But when a table is aliased, it has to be prefixed.

That caused problems like #711 and #861.
I would appreciate if you could test this for your use-cases (even though I added unit tests based on your reports), @bencorlett and @alfredbaudisch.

This change forces us to know whether we're wrapping a table or a column in every situation, but that is the case.

We could probably turn `wrap()` into a protected method now. Else, there's no real difference between `wrapColumn()` and `wrapTable()` now. I just thought that's more explicit, thus better.