IT不倒翁

Results 18 comments of IT不倒翁

Hi @gluxon Thanks. I've updated the code. We can replace the data fields automatically now if this pull request was merged! @timgws

Well, I think you can use the getHits() method to get the original content from ES. fox example ``` { total: 49, max_score: null, hits: [ { _index: "game", _type:...

@AlexLove77 the paginator does have a way to access the 'hits' data. ``` $result = Post::search($q)->paginate(10)->toArray(); { total: 373, per_page: 10, current_page: 1, last_page: 38, next_page_url: "x", prev_page_url: null, from:...

@nathan-zhu The author still did not merge the pr. I use my fork for now...

我直接先用的这个,然后自己手动改的一些文件 https://github.com/elasticquent/Elasticquent/pull/104

@nathan-zhu 我刚刚看到。。。。试了一下没问题啊。。。两个都高亮了 diff 里只是同一个字段高亮匹配到多个结果的时候只取第一个。

You can use the official one and write the class you self. Easy to use and config. https://github.com/ezyang/htmlpurifier

@JackPoint ``` 'default' => [ 'HTML.Doctype' => 'HTML 4.01 Transitional', 'Attr.AllowedFrameTargets' => '_blank', 'Attr.AllowedRel' => 'nofollow', 'HTML.Allowed' => 'h2,strike,blockquote,u,div,b,strong,i,em,a[href|title|target|rel],ul,ol,li,p,br,span,img[width|height|alt|src]', 'CSS.AllowedProperties' => 'font,font-weight,font-style,text-decoration,padding-left,text-align', 'AutoFormat.AutoParagraph' => false, 'AutoFormat.RemoveEmpty' => true, ], ```

@mewebstudio Here's how to add HTML5 elements directly using HTMLPurifier ...... can't figure out how do it using this package. +1