Artificial intelligent assistant

URL に指定する ID を数値型だけにしたい URL Action/Controller/Value Value URL /Action/Controller/123 /Action/Controller/123aa Value MySQL Controller Model ID AppController AppModel Controller if ?

URL

`app/Config/routes.php`

URL `/posts/view/123` `/posts/view/123abc`


Router::connect('/posts/:action/:id', [], ['id' => '[0-9]+']);


`Router::connect()`3

`/Action/Model/123`
: URLModel`Controller`


Router::connect('/:action/:controller/:id', [], ['id' => '[0-9]+']);




CakePHP
`app/Config/routes.php`requireCakePHP`routes.php`


require CAKE . 'Config' . DS . 'routes.php';


CakePHP 2.x Cookbook

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f34e27bf132322fdf58d927153a3ab94