protected function splitValuePairs($parameters, $first = 'is ', $last = 'or ')
{
$attribute = '';
collect($parameters)->map(function ($item, $key) use(&$attribute, $first, $last) {
$attribute .= '`' . $item . '` ';
if (($key + 1) % 2 === 0) {
$attribute .= $last;
} else {
$attribute .= $first;
}
});
$attribute = rtrim($attribute, $last);
return $attribute;
}