Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- App::uses('AppController', 'Controller');
- /**
- * Notes Controller
- *
- */
- class NotesController extends AppController
- {
- /**
- * Scaffold
- *
- * @var mixed
- */
- //public $scaffold;
- public $components = array('RequestHandler');
- public function index() {
- $recipes = $this->Note->find('all');
- $this->set(array(
- 'note' => $recipes,
- '_serialize' => array('note')
- ));
- }
- public function view($id) {
- $note = $this->Note->findById($id);
- $this->set(array(
- 'recipe' => $note,
- '_serialize' => array('note')
- ));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement