public function whereHasType($field, $type) { return $this->where($field, array('$type' => (int) $type)); }