Set controller without __invoke method from invokable class
This commit is contained in:
parent
952786af26
commit
cc68c5074e
@ -29,7 +29,11 @@ class AnnotatedRouteControllerLoader extends AnnotationClassLoader
|
||||
*/
|
||||
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot)
|
||||
{
|
||||
$route->setDefault('_controller', $class->getName().'::'.$method->getName());
|
||||
if ('__invoke' === $method->getName()) {
|
||||
$route->setDefault('_controller', $class->getName());
|
||||
} else {
|
||||
$route->setDefault('_controller', $class->getName().'::'.$method->getName());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user