Last active
November 15, 2017 16:06
-
-
Save kargirwar/17f701f097bd3748de0ad76392b77db1 to your computer and use it in GitHub Desktop.
PHP pug example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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