How to hide object but keep shadow in EEVEE?
EEVEE now supports some Light Paths but not all seems to be supported yet, or in working order. 

Until then, use this workaround.


Add a Transparent shader to the object's material.
Under the material options set the Blend Mode to anything other
than Opaque, most options seem to work.
Then under Transparent Shadows set it to opaque.