protected function addWhereStatements($query, $class)
    {
        $params = Request::all();

        foreach ($params as $key => $value) {
            if (!in_array($key, $this->keywordParams) && !in_array($key, $class::$filterable)) {
                throw new InvalidFilterException;
            }

            if (!in_array($key, $this->keywordParams)) {
                $query->where($key, '=', $value);
            }
        }

        return $query;
    }