Skip to content

Commit e234ac3

Browse files
committed
Merge pull request #7 from jamiehannaford/patch-1
Added an example to help out users to set variables
2 parents 9179dc5 + e7c9fa5 commit e234ac3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ class ReportController extends AbstractActionController
5454
$pdf->setOption('filename', 'monthly-report'); // Triggers PDF download, automatically appends ".pdf"
5555
$pdf->setOption('paperSize', 'a4'); // Defaults to "8x11"
5656
$pdf->setOption('paperOrientation', 'landscape'); // Defaults to "portrait"
57-
57+
58+
// To set view variables
59+
$pdf->setVariables(array(
60+
'message' => 'Hello'
61+
));
62+
5863
return $pdf;
5964
}
6065
}

0 commit comments

Comments
 (0)