The Model::pivot() method allows rows to be pivoted as columns. MySQL does not provide native functionality for this, so any results that require pivoting can first be queried with a normal Model; once this is done, Model::pivot() will return a new Model containing the pivoted results.
The Model::pivot() method allows rows to be pivoted as columns. MySQL does not provide native functionality for this, so any results that require pivoting can first be queried with a normal Model; once this is done, Model::pivot() will return a new Model containing the pivoted results.