I followed this tutorial and got SonataAdminBundle successfully installed. However, I’m very new to Symfony2 and I’m having trouble understanding parts of the routing configuration found in the tutorial.
# app/config/routing.yml
_sonata_admin:
resource: .
type: sonata_admin
prefix: /admin
- Where does resource: . get the routes from?
- What does type: sonata_admin mean?
Thanks!
The
typekey permits to the different routing loaders to know which one supports loading this routing resource.The
resource: .is just here to say that it will load everything. In fact, the routing loader does not care about this parameter, that’s why you put..