Guest User

Untitled

a guest
May 31st, 2012
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public function delete($id= null) {
  2. if ($this->request->is('get')) {
  3. throw new MethodNotAllowedException();
  4. }
  5. if ($this->Employee->delete($id)) {
  6. $this->Session->setFlash('The Employee with id: ' . $id . ' has been deleted.');
  7. $this->redirect(array('action' => 'index'));
  8. }
  9. }
  10.  
  11. and for view
  12.  
  13. public function view($id = null) {
  14. $this->Employee->id = $id;
  15. $this->set('view', $this->Employee->read());
  16. }
  17.  
  18. I assume I have to make a ctp for view?
Advertisement
Add Comment
Please, Sign In to add comment