Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. Errors 404 Not Found:The requested address '/admin/neighborhoods/index'
  2. was not found on this server.
  3.  
  4. class Neighborhood extends AppModel
  5. {
  6. var $name = 'Neighborhood';
  7.  
  8. }
  9.  
  10. class NeighborhoodsController extends AppController
  11. {
  12. var $name = 'Neighborhoods';
  13.  
  14. function beforeFilter()
  15. {
  16. $this->Auth->allow('add','index');
  17.  
  18. }
  19.  
  20.  
  21. function index() {
  22. $this->set('Neighborhoods', $this->Neighborhood->find('all'));
  23. }
  24.  
  25. function add() {
  26. if (!empty($this->data)) {
  27. if ($this->Neighborhood->save($this->data)) {
  28. $this->Session->setFlash('Your Neighborhood has been saved.');
  29. $this->redirect(array('action' => 'index'));
  30. }
  31. }
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement