I recently started learning Laravel and cannot solve my problem with queries.

 `SELECT * FROM `films` WHERE id IN (SELECT film_id FROM`favorites` WHERE user_id = 2)` 

This is the correct code, but how to make it for Laravel
I tried to look in documentation, but it's all not that. Maybe someone knows how to solve this problem?