Mike Rockétt

WeasyPrint for Laravel, v5 released

The elegant wrapper, Weasyprint for Laravel v5 is released with a bunch of new features and changes.

#Laravel — 11 April 2021

The package, previously known as Laravel WeasyPrint, had remained untouched for quite some time, until now. One of its drawbacks was that it didn’t have first-class support for the Laravel Service Container. Additionally, it wasn’t very configurable at framework-level.

Version 5 is a total rewrite of the package that solves these problems, and introduces a new API to boot. It’s somewhat more flexible than it was before, and may now be resolved via the service container, or instantiated directly via the service class.

As such, there are quite a few changes, both to the internal mechanics as well as the interface. If you’re upgrading from a previous version, be sure to follow the upgrade guide and have a skim over the changelog.

WeasyPrint for Laravel now requires Laravel 8 running on PHP 8.

The docs in the readme have been updated as well, and are a lot more exhaustive than before, but there’s also a cheat-sheet if you’d like to skip all of that. 😅