  We study the zero-temperature quantum phase diagram for a two-component
Bose-Einstein condensate in an optical cavity. The two atomic spin states are
Raman coupled by two transverse orthogonally-polarized, blue detuned plane-wave
lasers inducing a repulsive cavity potential. For weak pump the lasers favor a
state with homogeneous density and predefined uniform spin direction. When one
pump laser is polarized parallel to the cavity mode polarization, the photons
coherently scattered into the resonator induce a polarization gradient along
the cavity axis, which mediates long-range density-density, spin-density, and
spin-spin interactions. We show that the coupled atom-cavity system implements
central aspects of the $t$-$J$-$V$-$W$ model with a rich phase diagram. At the
mean-field limit we identify at least four qualitatively distinct density- and
spin-ordered phases including ferro- and anti-ferromagnetic order along the
cavity axis, which can be controlled via the pump strength and detuning. A real
time observation of amplitude and phase of the emitted fields bears strong
signatures of the realized phase and allows for real-time determination of
phase transition lines. Together with measurements of the population imbalance
most properties of the phase diagram can be reconstructed.
