เชื่อม template engine twig แล้ว error ครับ
โพสต์แล้ว: 26/11/2019 1:44 pm
ผมต้องการที่จะเชื่อม template engine twig ไฟล์ที่อยู่ในโฟร์เดอร์ template แต่กลับ error ครับเป็นเพราะอะไร ครับ
โค้ด
โค้ด
โค้ด: เลือกทั้งหมด
$loader = new \Twig\Loader\FilesystemLoader('invoice');
$twig = new \Twig\Environment($loader, [
'cache' => 'invoice/cache',
]);
โค้ด: เลือกทั้งหมด
echo $twig->render('invoice.html', [