$data = Districts::distinct()->whereRaw('LOWER(district) like ?', [strtolower('%'.$district . '%')])->orWhereRaw('LOWER(region) like ?', [strtolower('%'.$district . '%')])->select('region', 'district')->get();
I have this query, but problem is that distinct not working. I get for example three records for same thing. Any suggestion?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire