Slim: Static routing with `pathFor()`

Created on 11 Jan 2018  路  5Comments  路  Source: slimphp/Slim

(First, sorry for my poor English.)

Recently I faced a tiny problem. I want to build URI/URL with my static assets, like below codes.

$container->router->pathFor('static', ['path' => 'a.css'], ['absolute' => true])

But, there is no way to do(without overriding/customizing default Router). Once I used Flask, there is a function for routing url_for() supports static routing. And I thought both have same concept for url routing.

Is there any plan for support static routing in pathFor()? (And thanks for your patience :smile: )

question

Most helpful comment

Yes this would be a helpful feature.

All 5 comments

Not currently no, but we are open to PRs :)

Thanks! And, do you feel the pseudo code follows your design policy?

Yes this would be a helpful feature.

Closing as there's been no movement on this one and I'm unclear what is being asked for.

Please create a new issue with detailed information if necessary.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

snoopy72 picture snoopy72  路  4Comments

alffonsse picture alffonsse  路  4Comments

jwyuen picture jwyuen  路  5Comments

codeguy picture codeguy  路  4Comments

jaklimoff picture jaklimoff  路  4Comments