public function whereColumn($first, $operator = null, $second = null, $boolean = 'and')
{
// If the column is an array, we will assume it is an array of key-value pairs
// and can add them each as a where clause. We will maintain the boolean we
// received when the method was called and pass it into the nested where.
if (is_array($first)) {
return $this->addArrayOfWheres($first, $boolean, 'whereColumn');
}
// If the given operator is not found in the list of valid operators we will
// assume that the developer is just short-cutting the '=' operators and
// we will set the operators to '=' and set the values appropriately.
if (!in_array(strtolower($operator), $this->operators, true) && !in_array(strtolower($operator), $this->grammar->getOperators(), true)) {
list($second, $operator) = [$operator, '='];
}
$type = 'Column';
$this->wheres[] = compact('type', 'first', 'operator', 'second', 'boolean');
return $this;
}