src/Primitive/Support/Traits/RetrievableTrait.php
public function getSearchable($value, $default = [])
    {
        if ($this->isArrayable($value))
        {
            return $this->getArrayable($value, $default);
        }
        elseif ($this->isStringable($value))
        {
            return $this->getStringable($value, $default);
        }
        elseif ($value instanceof Closure)
        {
            return $value;
        }

        return value($default);
    }
public function getSearchable($value, $default = [])
    {
        if ($this->isArrayable($value))
        {
            return $this->getArrayable($value, $default);
        }
        elseif ($this->isStringable($value))
        {
            return $this->getStringable($value, $default);
        }
        elseif ($value instanceof Closure)
        {
            return $value;
        }

        return value($default);
    }
Retrieve value that can be used in search methods.

@param mixed $value
@param mixed $default
@return array|string|\Closure|mixed