Hello
I was trying to create an admin for my controller Posts, I used cake console option to create controller, I type Y for the question "Need admin routing ?", I entered Y and I got written my controller with admin functions, one of my admin function looks like this
function admin/controller_view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid post', true));
$this->redirect(array('action' => 'index'));
}
$this->set('post', $this->Post->read(null, $id));
}
But when I execute I am getting the following error
Parse error: syntax error, unexpected '/', expecting '(' in C:\xampp\htdocs\cake\blog\app\controllers\posts_controller.php on line 61
I am using cakephp 1.3, What should I do to create an admin panel for this controller ?
Thaks a lot