I have VPS where I run php (7.4) and nginx.
I have installed Nette and other packages by composer.
My problem is:
I can't print flash messages. In my presenter I have code $this->flashMessage("Odhlášení proběhlo úspěšně.", "success");
And in @layout.latte
I have this:
{snippet flashes}
{foreach $flashes as $flash}
{if $flash->type === 'success'}
<script>toastr.success({$flash->message});</script>
{elseif $flash->type === 'info'}
<script>toastr.info({$flash->message});</script>
{elseif $flash->type === 'warning'}
<script>toastr.warning({$flash->message});</script>
{elseif $flash->type === 'error'}
<script>toastr.error({$flash->message});</script>
{else}
<script>toastr.info({$flash->message});</script>
{/if}
{/foreach}
{/snippet}
When I dump $flashes
in latte nothing is there.
EDIT:
Flashes save to session but latte can't take it from session.
EDIT 2:
I setting flash message by this way:
In processing form:
$this->flashMessage("Obrázek úspěšně upraven.", "success");
$this->redirect("Gallery:default");
What I have to do to fix this? Thanks for answers.