Menu Close
    Hire us 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:

    . . .

    Comment

    Add Your Comment

    Be the first to comment.

    Back to Top
    css.php
    Hire Us!
    Brief us about your requirements and we'll get back to you.
    Woo! Hooy!
    We have just received your message and our expert will get back to you shortly.
    Send Again
    Close