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

Routing system: add redirect in routes #34

Closed
AnthonySnow887 opened this issue May 13, 2022 · 1 comment
Closed

Routing system: add redirect in routes #34

AnthonySnow887 opened this issue May 13, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@AnthonySnow887
Copy link
Owner

RUS

Добавить redirect в маршруты, чтобы использовать автоматическое перенаправление без вызова метода контроллера:

get("/stories", [ 'to' => redirect("/articles") ] );
// --- or ---
get("/stories/:name", [ 'to' => redirect("/articles/%{name}") ] );
// --- or ---
get("/stories/:name", [ 'to' => redirect("/articles/%{name}", /*status*/ 302) ] );

ENG

Add redirect to routes to use automatic redirect without calling a controller method:

get("/stories", [ 'to' => redirect("/articles") ] );
// --- or ---
get("/stories/:name", [ 'to' => redirect("/articles/%{name}") ] );
// --- or ---
get("/stories/:name", [ 'to' => redirect("/articles/%{name}", /*status*/ 302) ] );
@AnthonySnow887 AnthonySnow887 added the enhancement New feature or request label May 13, 2022
@AnthonySnow887
Copy link
Owner Author

RUS

Добавлено в коммите e55c0e0

ENG

Added in commit e55c0e0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant