src/View/ViewServiceProvider.php
public function registerTwigEngine()
    {
        /** @var Factory $factory */
        $factory = $this->app['view'];
        $factory->addExtension('twig', 'twig', function () {
            return new Twig($this->app['twig'], $this->app['view.finder']);
        });
    }
public function registerTwigEngine()
    {
        /** @var Factory $factory */
        $factory = $this->app['view'];
        $factory->addExtension('twig', 'twig', function () {
            return new Twig($this->app['twig'], $this->app['view.finder']);
        });
    }
public function registerTwigEngine ( ) { /** @var Factory $factory */ $ factory = $ this -> app [ 'view' ] ; $ factory -> addExtension ( 'twig' , 'twig' , function ( ) { return new Twig ( $ this -> app [ 'twig' ] , $ this -> app [ 'view.finder' ] ) ; } ) ; }
Register the Twig engine implementation.
Register the Twig engine implementation .