-
I know within a footer we have access to the @pagenumber @TotalPages blade directives, but is it possible to pass any other dynamic data such as a client's name (where that data would change depending on who's account we are printing the documents for, so we can't just hard code the data). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Welp, I answered my own question. I don't see it in the documentation, but apparently you can pass an array of data as the second parameter to the headerView() and footerView() methods:
|
Beta Was this translation helpful? Give feedback.
Welp, I answered my own question. I don't see it in the documentation, but apparently you can pass an array of data as the second parameter to the headerView() and footerView() methods:
$pdf = PDF::view('document-name', $data)->footerView('components.header', ["client" => $client]);