Skip to content

Conversation

@HavokInspiration
Copy link
Member

No description provided.

@HavokInspiration HavokInspiration added this to the 3.next milestone Jul 7, 2017
``scope()``::

// Dans config/routes.php
use Cake\Routing\Route\DashedRoute;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Route


$routes->connect(
'/cooks/:action/*', ['controller' => 'Users']
'/cuisiniers/:action/*', ['controller' => 'Users']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si tu changes cooks par cuisiniers il faut le faire ici aussi...

au controller users. L'action appelée dépendra de la valeur du paramètre
au ``UsersController``. L'action appelée dépendra de la valeur du paramètre
``:action``. En utilisant :ref:`route-elements`, vous pouvez créer des routes
variables, qui acceptent les entrées utilisateur ou les variables. La route
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Et la... le mieux et peut être de garder l'URL en anglais...

* PUT
* PATCH
* DELETE
* OPTIONS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retournent

// Crée un builder avec une classe de Route différente.
$routes->scope('/', function ($routes) {
$routes->routeClass(DashedRoute::class);
$routes->connect('/:controller/:id', ['action' => 'view'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Petit oubli

@HavokInspiration
Copy link
Member Author

@antograssiot C'est corrigé. Pour la traduction de l'URL, ça me paraissait bien de traduire cooks -> cuisiniers pour la compréhension et puis j'ai changé d'avis mais visiblement, j'en avais oublié 😄

@antograssiot antograssiot merged commit 7957ea7 into 3.next Jul 10, 2017
@antograssiot antograssiot deleted the 3.next-fr branch July 10, 2017 16:32
@antograssiot
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants