Skip to main content

Posts

Showing posts with the label Cakephp Route

Cakephp Route

If you want like this example.com/article/show-by-day.html example.com/article/slug-post.html Shows above url in route file like this Router::connect('/article/show_by_day',array('controller' => 'posts', 'action' => 'show'), array('pass' => array('show_by_day'))); Router::connect('/article/slug-post',array('controller' => 'posts', 'action' => 'view'), array('pass' => array('slug'))); Router::connect('/article/slug-post/:slug', array('controller' => 'posts', 'action' => 'view'), array('pass' => array('slug'))); if route like Router::connect('/account', array('controller' => 'clientcontacts', 'action' => 'index', 'account' => true)); then its controller function is public function account_index() { }  its view file...