dovrei aver risolto.
ho visto che alla where puoi passare anche una funzione:
codice:$query = MpGiacenzaAttr::query() ->join('mp_giacenze', 'giac_id', '=', 'gattr_giac_id') ->where('giac_feed', $feed) ->where('gattr_chiave', $chiave) ->where(function ($query) { $query->where('gattr_valore', '') ->orWhere('gattr_valore', 0); }) ->get();