Menu Close
    Start a Project Request quote Reading list Switch to dark mode

    Symfony – Use services in twig

    Symfony Service : Service is any PHP object that performs some sort of “global” task.

    To access service in twig , you need to define service in config.yml files. Following is the example how to defined servies in config.yml :

    Now you service is globally accessible in twig, you can use service by simply
    using the following statement:

    . . .


    Add Your Comment

    Be the first to comment.

    Back to Top
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just recieved your project brief and our expert will contact you shortly.
    Send Again