How to sort/order query based on presence in array in laravel?
I want to sort/order a query in laravel. For example I have a model where 'id' ranges from 1 to 100. And I have an array of ids of selected model elements eg. [1,3,12,32,...]. I want to sort my model…