03.12.2015 Views

laravel4cookbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

E-Commerce 224<br />

Bootstrap<br />

Sleek, intuitive, and powerful mobile first front-end framework for faster and easier<br />

web development.<br />

Bootstrap has become somewhat of a standard in modern applications. It’s often used as a CSS reset,<br />

a wire-framing tool and even as the baseline for all application CSS. We’re going to use it to neaten<br />

up our simple HTML.<br />

It’s available for linking (as we did with AngularJS):<br />

1 <br />

6 <br />

11 <br />

You can also download it, and serve it directly from the public folder. As it contains CSS and fonts;<br />

be sure to update all paths to the relevant images and/or fonts that come bundled with it.<br />

DOMPDF<br />

At its heart, dompdf is (mostly) CSS 2.1 compliant HTML layout and rendering engine<br />

written in PHP. It is a style-driven renderer: it will download and read external<br />

stylesheets, inline style tags, and the style attributes of individual HTML elements. It<br />

also supports most presentational HTML attributes.<br />

DOMPDF essentially takes HTML documents and converts them into PDF files. If you’ve ever had<br />

to produce PDF files programatically (at least in PHP) then this library should be like the singing of<br />

angels to your ears. It really is epic.<br />

To install this guy; we need to add a composer dependency:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!