How to add common model to Twig and Slim4
问题 I'm using Twig and Slim4 with DI container (the same as this tutorial: https://odan.github.io/2019/11/05/slim4-tutorial.html). I would like to know how can I add a common model to all my twig views, for example user object, general options and something like this. This is the container Twig initialization: TwigMiddleware::class => function (ContainerInterface $container) { return TwigMiddleware::createFromContainer($container->get(App::class), Twig::class); }, // Twig templates Twig::class =>