Advertisement
Guest User

Untitled

a guest
Jun 29th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2. App::uses('AppController', 'Controller');
  3. /**
  4.  * Notes Controller
  5.  *
  6.  */
  7. class NotesController extends AppController
  8. {
  9.     public $components = array('RequestHandler');
  10.     public function index() {
  11.         $note = $this->Note->find('all');
  12.         $this->set(array(
  13.             'note' => $note,
  14.             '_serialize' => array('note')
  15.         ));
  16.     }
  17.     public function view($id) {
  18.         $note = $this->Note->findById($id);
  19.         $this->set(array(
  20.             'note' => $note,
  21.             '_serialize' => array('note')
  22.         ));
  23.     }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement