Explanation:
The box has no acceleration in the perpendicular direction, so the net force in that direction is 0.
Sum of forces in the parallel direction:
∑F = f − F∥ − mg∥
∑F = f − F cos φ − mg sin θ