Save the next() function to the controller too.