cakephp url modification: remove action and add slug inflector
I'm trying to remove the action in the cakephp url and add a slug inflector, to be more clear this is my expected output: from this: example.com/posts/view/81/This is a test post to this: example.com/posts/This-is-a-test-post This is my current code: That gives me this output: example.com/posts/view/This is a test post Controller: public function view($title = null) { if (!$title) { throw new NotFoundException(__('Invalid post')); } $post = $this->Post->findByTitle($title); if (!$post) { throw new NotFoundException(__('Invalid post')); } $this->set('post', $post); } view.ctp: $this->Html->link