Missing Method in BusinessController Error: The action index is not defined in controller BusinessController Error: Create BusinessController::index() in file: app/Controller/BusinessController.php.
If I add this method, it brings me to the homepage. I want to go business_index.ctp
Here is my controller
App::uses('Controller', 'Controller'); class BusinessController extends AppController { public $name = 'Business'; public $components = array('Auth','RequestHandler','Cache'); public $uses = array('User','CreditHistory'); public function beforeFilter(){ parent::beforeFilter(); }
function Sync(){ $this->layout = $this->autoRender = false; } //Admin Dashboard public function business_index(){ $this->set('title','Dashboard'); $uid = $this->Auth->User('id'); $this->set('user_id',$uid); }
I have a view name business_index.ctp inside a folder name Business
Not sure what I am doing wrong.