Update PostsController.php

I have added the edit function in php