Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Last active August 29, 2015 14:12
Show Gist options
  • Save taleeb35/d90a654bf40850e12d76 to your computer and use it in GitHub Desktop.
Save taleeb35/d90a654bf40850e12d76 to your computer and use it in GitHub Desktop.
JSON
public function get_assigned_task_list() {
$user_id = $this->Auth->User('id');
$task_list = $this->Control->find('all',array('conditions' => array('owner_id' => $user_id)));
foreach ($task_list as $list) {
$id = $list['Control']['id'] . '<br>';
$name = $list['Control']['name'] . '<br>';
$desc = $list['Control']['description'] . '<br>';
}
$this->set(compact('id','name','desc'));
$this->set('_serialize' , array('id','name','desc'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment