Код: Выделить всё
my_route:
pattern: /{param1}/{param2}
defaults: { _controller: MyBundle:MyController:myAction }
Код: Выделить всё
500 Internal Server Error - ResourceNotFoundException
Код: Выделить всё
1. in C:\Users\itaziny\git\Symfony\app\cache\dev\appDevUrlMatcher.php at line 459
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
Код: Выделить всё
public function myActionAction(Request $request) {
$url = $request->headers->get('referer');
$router = $this->get('router');
$route = $router->match($url);
// Some code...
if (route == "my_route") {
// redirect to the pag: my_route
}
else {
//redirect to the page who called this action
}
}
Подробнее здесь: https://stackoverflow.com/questions/298 ... parameters