Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Errors 404 Not Found:The requested address '/admin/neighborhoods/index'
- was not found on this server.
- class Neighborhood extends AppModel
- {
- var $name = 'Neighborhood';
- }
- class NeighborhoodsController extends AppController
- {
- var $name = 'Neighborhoods';
- function beforeFilter()
- {
- $this->Auth->allow('add','index');
- }
- function index() {
- $this->set('Neighborhoods', $this->Neighborhood->find('all'));
- }
- function add() {
- if (!empty($this->data)) {
- if ($this->Neighborhood->save($this->data)) {
- $this->Session->setFlash('Your Neighborhood has been saved.');
- $this->redirect(array('action' => 'index'));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement