Just the shadow catcher?

Is there a simple way to have the shadow catcher plane be on its own view layer in Cycles and still receive shadows? I know it’s possible to make the shadow-casting objects invisible to camera rays, but that renders the object non-rendering in all view layers. When i remove the objects casting shadows from the shadow-catcher’s view layer, naturally enough I don’t get the shadows I want. I’d like to be able to control the strength of the cast shadow independently of the appearance of the object casting the shadow.
N

In the view layer you want your shadow catcher to only appear in render, turn off camera visibility for any object you don’t want to render. The shadow will still be there.

This is a render of default cube scene with a shadow catcher. The cube has no camera visibility.

Thank you for the response! Maybe I’m missing something, but when I use that method, the objects in question disappear in the render across all of the view layers. This means, for me, when I use that method in a view layer, I have to make another scene and render everything again so that I have the objects for compositing as well. Additionally, since I don’t have easy access to other scenes from within the compositor, I’m just unable to use it.
Is there a way to restrict turning off camera visiblity for an object in a view layer without having it affect other view layers? Or do I need to make a duplicate object to stand in in the other scenes? It seems like there should be an easier way…

I forgot that it affects all the view layer. Then you have to duplicate objects.

Yeah, that’s what I thought, but it’s slightly more of a pain than Blender usually inflicts, so I was thinking I was just missing something. Thanks!

No, you don’t need to duplicate any objects.
Just put the shadow catcher and all other objects in different collections. In the view layer where you just want to see the shadows, right click the collection with the other objects and select View Layer --> Set Indirect Only.
I think this works for Cycles only, in Blender 2.8 and higher.