Generating the controller and adding routes.