Implemented view and index view for post and generalised post controller into controller