2
我已經配置這兩條路線配置Silex的路線可選參數
$app->match ('/controller/param/{country}/{q}', "demo.controller:demoAction")->value ('country', 'de')->value('q', '')->bind ('demo_action_with_country');
$app->match ('/controller/param/{q}', "demo.controller:demoAction")->value ('q', '')->bind ('demo_action_without_country');
但是 - 這是行不通的。如果我撥打/controller/param/Test-String
,則路線匹配並返回內容。如果我打電話/controller/param/DE/Test-String
我得到NotFoundHttpException
我該如何解決問題?