Using a method to create posts