Added index, new, create methods in posts controller