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;
    }
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;
    }
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 ; }
Loop through Request params, creating `where` statements.

@param $query
@return mixed
Loop through Request params creating where statements .