taking a stab at implementing this with Laravel