Instead of using the ๐๐ต๐ฒ๐ฟ๐ฒ๐๐ป() method to load a large range of data when the targeted value is an integer, use ๐๐ต๐ฒ๐ฟ๐ฒ๐๐ป๐๐ฒ๐ด๐ฒ๐ฟ๐๐ป๐ฅ๐ฎ๐() which is faster than ๐๐ต๐ฒ๐ฟ๐ฒ๐๐ป().
// Instead of using whereIn():
Product::whereIn('id', range(1, 50))->get();
// Use whereIntegerInRaw() to improve query performance.
Product::whereIntegerInRaw('id', range(1, 50))->get();