added post index method to post controller