Class ‘App\Presenters\Latte\Engine’ not found

4 years ago

frocco
Member | 46
+
0
-

In my HomePresenter, I am trying to send mail.

$latte = new Latte\Engine; // This causes error.

4 years ago

looky
Member | 100
+
0
-

Namespace!

$latte = new \Latte\Engine;

Last edited by looky (2015-03-27 20:07)

4 years ago

frocco
Member | 46
+
0
-

Thank you.

getting error Missing template file 'contactEmail.latte

template is in my Homepage folder

4 years ago

frocco
Member | 46
+
0
-

I had to specify the full path. Is this the way renderToString works?

->setHtmlBody($latte->renderToString(__DIR__ .'/templates/Homepage/email.latte', $params));