rhmiller_ic
rhmiller_ic

Reputation: 110

Get Route from Controller and method

In Play if I want to get the string form of the route how do I get that from the controller and method declaration?

eg

Application.home()

Upvotes: 0

Views: 85

Answers (1)

alili
alili

Reputation: 166

Check out https://www.playframework.com/documentation/1.4.x/routes#reverse

String url = Router.reverse("Application.home").url;

Upvotes: 1

Related Questions