sort result as group

Posted 1 year ago by arctushar

Hi I have an eloquent like

Record::where('codelist_id','=',array(1,2))->get()

result is showing ok. NB there r multiple row which have codelist_id=1 and also multiple row which have 2.

they r not serialise, I can serialize by using ORDER BY. But I need other.

in the view I want to make two html table. On will be based on codelist_id=1 and other will be codelist_id=2. Remember query may be array(1,2,4,5,50.....)

Plz help if its possible. I tried but failed.

Please sign in or create an account to participate in this conversation.