Comments (7)
Try array('data' => $data) instead of $data
from laravel-dompdf.
Tried what you said:
public function pdf()
{
$data = DailyReports::all();
$pdf = PDF::loadView('reports.daily', array('data' => $data));
return $pdf->download('report.pdf');
}
Still same error
from laravel-dompdf.
And can you show the view? Have you tried a simple view, for testing?
Probably some error in your view.
Op 4 dec. 2013 21:55 schreef "Lee Stables" [email protected]:
Tried what you said:
public function pdf()
{
$data = DailyReports::all();
$pdf = PDF::loadView('reports.daily', array('data' => $data));
return $pdf->download('report.pdf');
}Still same error
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-29844498
.
from laravel-dompdf.
Or yeah, shit! the view i used chart.js need to do a new view then I'm guessing Sorry dude for bothering you
from laravel-dompdf.
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?
from laravel-dompdf.
It should just work the same as a normal view. So you can use blade etc to
do a foreach as usual yes.
Op 4 dec. 2013 22:00 schreef "Lee Stables" [email protected]:
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?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/16#issuecomment-29845020
.
from laravel-dompdf.
Sweet, your a legend, and thanks for the super, super quick replies!!
from laravel-dompdf.
Related Issues (20)
- how can custom paper size define in px HOT 1
- Dompdf 2.0.4 fixes Possible DoS caused by infinite recursion when validating SVG images HOT 4
- Error 503. Service Unavailable HOT 4
- Not Supporting Gujarati Fonts HOT 1
- Incorrect file handling for symlinked paths HOT 3
- Laravel Dompdf rendering broken font on different laravel server HOT 1
- Watermark HOT 1
- Is it possible to indent within html? HOT 1
- open() argument #1 ($filename) must not contain any null bytes HOT 1
- Undefined array key "" HOT 1
- File(/.ufm) is not within the allowed path(s) HOT 8
- Security issue with dompdf/dompdf <2.0.4 dependency HOT 2
- Add support for Laravel 11
- CSS and Image not rendering on my PDF HOT 1
- Found 1 security vulnerability advisory affecting 1 package: in mpdf HOT 1
- installation problem
- Dompdf\\Options::validateArtifactPath(): Argument #1 ($path) must be of type string, null given, HOT 6
- Currency Symbol Error - Naira (₦) HOT 2
- > Just Replace ( dompdf\src\Image\Cache.php ) From dompdf 0.8.5 To All New Version Dompdf !
- Security vulnerability - phenx/php-svg-lib HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-dompdf.