After looking at the code, I found how to do:

Router::prefix('admin', callback) is actually equivalent to 
Router::scope('/admin', 
['prefix' => 'admin'], callback) so one can use Router::scope() to add 
routing defaults to prefixed routes.


Le vendredi 13 mars 2015 09:40:18 UTC-7, Pgbi a écrit :
>
> Hi cakephp world !
>
> With Router::connect() and Router::scope() one can pass a params parameter 
> which represents "An array of routing defaults to add to each connected 
> route".
>
> I was expecting Router::prefix() to be able to also handle a params 
> parameter. But that's not the case.
>
> Is there any reason for that? How would your gracefully add routing 
> defaults to prefixed routes?
> Do you think it would be useful to make Router::prefix() capable of 
> handling a params parameter (i can have a look at it)?
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

Reply via email to