I’m new to cakePHP. I’m trying to create a login page. I was able to create a login page. I’ve a problem with login redirect. When I submit the login credentials, I will be redirect to a page where it contains the following text.
Sweet, “App” got Baked by CakePHP!
Your tmp directory is writable.
The FileEngine is being used for caching. To change the config edit APP/config/core.php
Your database configuration file is present.
Cake is able to connect to the database.
But, this is not correct. In my app_controller, I wrote code to redirect to different page as mentioned below:
function beforeFilter() {
//Configure AuthComponent
$this->Auth->authorize = 'actions';
$this->Auth->actionPath = 'controllers/';
$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
$this->Auth->loginRedirect = array('controller' => 'patients', 'action' => 'index');
$this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login');
}
What do I need to do to redirect to /patients/index?
Regards,
Balu
in config->routes.php change your first line to this….
Router::connect('/', array('controller' => 'patients', 'action' => 'index'));api55 is right but I can see your frustration so this should be instant gratification for you.