core
core copied to clipboard
multiple words route
hello, How can I allow multiple words in a route?
//domain.com/detroit //domain.com/new-york $city='detroit|miami|new-york|boston'; F::route('/('.$city.')', function(){ ... });
How about do this:
F::route(
'GET /@city:[a-z-]{3,30}',
function($city) {
echo $city;
}
);