pdf-l4
pdf-l4 copied to clipboard
Cannot pass value to view bldade and render HTML
I am creating pdf in controller, When I use View::make('invoice.view') to load html it works fine.
$pdf = new \Thujohn\Pdf\Pdf(); $content = $pdf->load(View::make('invoice.view'))->output(); File::put($compete_file_path, $content);
But when I pass data to view, it throws error
$pdf = new \Thujohn\Pdf\Pdf(); $pdf->load(View::make('invoice.aaa')->with(array($name = 'varun')))->output(); File::put($compete_file_path, $content);
Error: Symfony \ Component \ Debug \ Exception \ FatalErrorException Method Illuminate\View\View::__toString() must not throw an exception
Maybe array($name => 'varun')
instead of array($name = 'varun')
?
I have this error Method Illuminate\View\View::__toString() must not throw an exception. I manage to past data on Get method, but when using post method, it got error
What's your code ?
i have same problem. I got error if i passed data from method post.