You have to redirect your homepage to the index()
of PostsController
.
Go to your routes.php
file and change this line:
Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));
for this one:
Router::connect('/', array('controller' => 'posts', 'action' => 'index'));
(assuming that your index()
actually contain a list of all your posts)
Router::connect
will catch when an user attempt to go to the url on the first parameter, and will redirect it to the action in the controller on the second parameter