Skip to content

Instantly share code, notes, and snippets.

@kargirwar
Last active November 15, 2017 16:06
Show Gist options
  • Save kargirwar/17f701f097bd3748de0ad76392b77db1 to your computer and use it in GitHub Desktop.
Save kargirwar/17f701f097bd3748de0ad76392b77db1 to your computer and use it in GitHub Desktop.
PHP pug example
<?php
function getContent()
{
$pug = new \Pug\Pug([
'basedir' => __DIR__ . '/templates',
]);
return $pug->renderFile('mail.pug', [
'name' => "Example User",
'data' => [
['c1' => 'v11', 'c2' => 'v12', 'c3' => 'v13', 'c4' => 'v14'],
['c1' => 'v21', 'c2' => 'v22', 'c3' => 'v23', 'c4' => 'v24'],
]
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment