I am using SphinxSearch to query some contents and have the ids of my objects that I want to query with MySQL. The array of my ids are sorted depending on their rank Sphinx
$category_id = Category::select('id')->orderby('name','ASC')->get()->pluck('id')->toArray();