How can I add global variables for Twig in Slim 3.5?
<p>In Symfony, I'm used to using <code>{{ app.user.username }}</code> in any view. Can I do something like this in Slim?</p>

<p>Currently I am adding the user to the <code>$container['user']</code> and passing it into every view with <code>view-&gt;render($response, 'index.html.twig', ['user' =&gt; $this-&gt;user])</code>.</p>

<p>In other words, can I add <code>user</code> as a global variable for Twig? I saw many similar questions but not had a solution I was able to use.</p>