setDefault('_', compact('class', 'method', 'annotation')); } protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) { $name = parent::getDefaultRouteName($class, $method); $name = preg_replace('/app_\w+_controller_/', '', $name); $name = str_replace('_', '.', $name); return $name; } }