-
-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Method Illuminate\View\View::__toString() must not throw an exception #16
Comments
Try array('data' => $data) instead of $data |
Tried what you said: public function pdf() Still same error |
And can you show the view? Have you tried a simple view, for testing?
|
Or yeah, shit! the view i used chart.js need to do a new view then I'm guessing Sorry dude for bothering you |
So by creating a new view I just put in {{{ $data }}} which worked but then the pdf shows an array of data can i just do a foreach loop and put some styling to it? |
It should just work the same as a normal view. So you can use blade etc to
|
Sweet, your a legend, and thanks for the super, super quick replies!! |
What is this issue, I installed via Composer and added the alias and service provider, as per the docs on Github, and my code in the controller looks like so:
public function pdf()
{
$data = DailyReports::all();
$pdf = PDF::loadView('reports.daily', $data);
return $pdf->download('report.pdf');
}
The text was updated successfully, but these errors were encountered: