In the cakephp blog tutorial in the Add Post add() action section
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/part-two.html
I can't understand what this $this->Post->create(); does, I tried to remove that line of code and it still works just fine. what does that line of code do?
public function add() {
if ($this->request->is('post')) {
$this->Post->create();
if ($this->Post->save($this->request->data)) {
$this->Session->setFlash(__('Your post has been saved.'));
return $this->redirect(array('action' => 'index'));
}
$this->Session->setFlash(__('Unable to add your post.'));
}
}