Created controller for posts