Update PostsController.php

Fixed the index function by adding a } to close it