Update PostController.php

Added form validation for adding posts and editing posts.

Added functions for editing and deleting posts.