For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Friday, April 03, 2015

How to change default controller in CakePHP 3.0

Problem:

How to change default controller in CakePHP 3.0. You know that default page of CakePHP 3.0 is Pages and it's action is display.

Solution:

To change default controller in CakePHP 3.0 open config.php which is located under "config" folder.
and change :

$routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'home']);
TO
$routes->connect('/', ['controller' => 'Welcome', 'action' => 'index', 'home']);

Where Welcome is your created controller.

Share:

0 comments:

Post a Comment

How to make center align child div

 How to make center align child div?   Suppose you have 2 Div tag. And want the make inner tag center <div id="d1">      ...

Ads Inside Post

Powered by Blogger.

Arsip

Blog Archive