Update PostsController.php

Wrote the add function