The UEFA Euro 2012 champions were initially frustrated as Newcastle United goalkeeper Martin Dubravka saved a penalty by former Chelsea striker Alvaro Morata, but Slovakia's No 1 then scored an own goal as he failed to turn a looping ball over his crossbar with 30 minutes gone.
Laporte made it 2-0 with a header, while the centre-back's Man City team-mate Torres added a fourth with a clever flick within a minute of his introduction as a substitute.
Spain secured second spot in Group E and a meeting with Chelsea midfielder Mateo Kovacic's Croatia in the last 16 on 28 June.
A great night for our lads as both @Laporte and @FerranTorres20 bagged a goal as #ESP sealed a 5-0 win over #SVK to progress through to the last 16! 👏— Manchester City (@ManCity) June 23, 2021
🔷 #ManCity | https://t.co/ewNX9q4Ogq https://t.co/aRpso7xKtC
Chelsea attacker Kai Havertz netted his second goal of UEFA Euro 2020 as Germany twice fought back to draw 2-2 against Hungary.
Germany secured second place in Group F with their draw, meaning they will take on a host of Premier League stars as they meet Group D winners England at Wembley Stadium on 29 June.
Pogba's pinpoint pass teed up France's second goal as the point earned them top spot in Group F and a knockout tie against Switzerland on 28 June.
The holders will meet Belgium in the last 16, with Portugal's Ruben Dias coming up against his Man City colleague Kevin De Bruyne as a combined total of 18 Premier League players fill their UEFA Euro 2020 squads.