Change the Symfony default driver

1

Symfony loading the files loads the default driver, DefaultController.php . How can I change that file by any other name?

Logically the error that I get when I delete it is:

  

class AppBundle \ Controller \ DefaultController does not exist

    
asked by CometaRojo 12.01.2017 в 14:28
source

1 answer

1

Both the file name and the class name must be identical:

AppBundle\Controller\[Nombre]Controller || AppBundle\Controller\[Nombre]Controller.php
//                   ^^^^^^^^                                   ^^^^^^^^

If you use routing.yml:

app:
    path:     /usuarios
    defaults: { _controller: "AppBundle:[Nombre]:usuarios" }
    
answered by 16.01.2017 в 16:13