I'm planning to create a function that sends an email but my concern is that I need to get my email template and pass variables inside.
For now this is what I got :
$template = $this->view->render('./partials/email-template.twig',['name'=>'sample']);
but I'm getting this error :
Uncaught TypeError: Argument 1 passed to Slim\Views\Twig::render() must implement interface Psr\Http\Message\ResponseInterface, string given, called in C:\xampp\htdocs\master\app\Controllers\Admin\VoucherController.php on line 34