Flows of particles through bottlenecks are ubiquitous in nature and industry, involving both dry granular materials and suspensions. However, difficulties in precisely controlling particle properties in conventional set-ups hinder the full understanding of these flows in confined geometries. Here, we present a microfluidic model set-up to investigate the flow of dense suspensions in a two-dimensional hopper channel. Particles with controlled properties such as shape and deformability are in situ fabricated with a photolithographic projection method and compacted at the channel constriction using a Quake valve. The set-up is characterised by examining the flow of a dense suspension of hard, monodisperse disks through constrictions of varying widths. We demonstrate that the microfluidic hopper discharges particles at a constant rate under both imposed pressure and flow rate. The discharge of particles under imposed flow rate follows a Beverloo-like scaling, while it varies nonlinearly with particle size under imposed pressure. Additionally, we show that the statistics of clog formation in our microfluidic hopper follow the same stochastic laws as reported in other systems. Finally, we show how the versatility of our microfluidic model system can be used to investigate the outflow and clogging of suspensions of more complex particles.