public function scopeStock($query, $operator = null, $stock = null)
    {
        if ($operator && $stock) {
            return $query->whereHas('stocks', function ($query) use ($operator, $stock) {
                if ($output = $this->getOperator($operator)) {
                    return $query->where('quantity', $output[0], $stock);
                } else {
                    return $query;
                }
            });
        }

        return $query;
    }