public static function getQueryWhere($request, $query, $parameters)
    {
        $indexColumns   = isset($parameters['indexColumns'])? $parameters['indexColumns'] : null;
        $where          = isset($parameters['where'])? $parameters['where'] : null;
        $whereColumns   = isset($parameters['whereColumns'])? $parameters['whereColumns'] : null;
        
        if($where != null)
        {
            $columns = $request->input('columns');

            $query->where(function($query) use ($columns, $indexColumns, $where){
                $i=0;
                foreach($indexColumns as $indexColumn)
                {
                    // check if column if is searchable
                    if($columns[$i]['searchable'] === 'true')
                    {
                        if(is_array($indexColumn)) $indexColumn = $indexColumn['data'];
                        
                        $query->orWhere($indexColumn, 'LIKE', '%' . $where . '%');
                    }
                    $i++;
                }
            });
        }

        if(is_array($whereColumns))
        {
            $query->where(function($query) use ($whereColumns) {
                foreach($whereColumns as $whereColumn)
                {
                    // enable option to be null value, with NULL
                    if($whereColumn['value'] == 'NULL')
                        $whereColumn['value'] = null;

                    $query->where($whereColumn['column'], $whereColumn['operator'], $whereColumn['value']);
                }
            });
        }

        return $query;
    }