Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve routing #6

Open
j15e opened this issue Nov 28, 2012 · 0 comments
Open

Improve routing #6

j15e opened this issue Nov 28, 2012 · 0 comments

Comments

@j15e
Copy link
Member

j15e commented Nov 28, 2012

 Les routes pour les horaires sont présentement sous cette structure: /horaire/{_locale}/{day}/{slug}-{id}. Il faudrait plutôt qu'elle soit comme ceci /horaire/{day}/{slug}-{id} pour le français et /{_locale}/schedule/{day}/{slug}-{id} pour l'anglais. Il faudrait aussi s'assurer que les jours de semaine soit traduits (ex: /en/schedule/monday/conf-1/).

Le petit hack qu'on avait trouvé pour arriver à une telle structure est le suivant:

$schedule = function ($args) use ($app) {
  // code here
}

$app->get('/route-fr/', $schedule)
    ->value('_locale', 'fr')
    ->bind('schedule_fr');

$app->get('/{_locale}/route-en/', $schedule)
    ->value('_locale', 'en')
    ->assert('_locale', 'en')
    ->bind('schedule_en');
  • faut changer le front-end js aussi..
j15e pushed a commit that referenced this issue Jan 15, 2013
Fix JS Unexpected token (2nd) [deployed]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant