Created the methods to generate the table data on the controller