fixed post variable issue and post controller to index show all posts