Advertisement
Guest User

Untitled

a guest
May 26th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1. public function create()
  2. {
  3.     $this->autoRender = false;
  4.     $thread = $this->Threads->newEntity($this->request->data['users'], ['associated' => ['Users']]);
  5.     $this->Threads->save($thread);
  6.     echo json_encode($thread->id, JSON_NUMERIC_CHECK);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement