[5.5] Add a "qualifyColumn" method to the Eloquent Model by JosephSilber · Pull Request #22577 · laravel/framework

Useful in complex queries where you need to qualify the column name to avoid collision: function addSomeComplexSubquery($query, $model) { $query->where($model->qualifyColumn('column&#...