generates posts controller