I'm using this query to get data, but problem is that i dont get regions. Any suggestion how can i get regions but to avoid duplicate districts ?
$data = Districts::distinct('order')->whereRaw('LOWER(district) like ?', [strtolower('%'.$district . '%')])->orWhereRaw('LOWER(region) like ?', [strtolower('%'.$district . '%')])->select('district')->groupBy('district')->get();
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire