created posts controller.