How can I pass a URL in a Silex-app?
My given specification is:
http://mysilex.app/http://anotherurl.com
So, I would like to use it in my app like this:
$app->get('/{url}', function ($url) {
//do awesome things with $url(=http://anotherurl.com)
return $url;
});
Is that possible in Silex?
Set .*
pattern for url
parameter
$app->get('/{url}', function ($url) {
//do awesome things with $url(=http://anotherurl.com)
return $url;
})
->assert('url', '.*');