Posts tagged with spatie

Join thousands of developers

Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

No spam. Unsubscribe anytime. You can also follow me on X.

Easily create PDFs in Laravel apps

by Freek Van der Herten – 6 minute read

We’ve released a new package called spatie/laravel-pdf, a batteries-included package to generate PDFs in Laravel apps. Under the hood, it uses Chromium to generate PDFs from Blade views. You can use modern CSS features like grid, flexbox, and even frameworks like Tailwind to create beautiful PDFs.

In this post, I’d like to introduce and demonstrate the package.

Read more

New major versions for spatie/image and Laravel Media Library have been released

by Freek Van der Herten – 11 minute read

We’ve released a new major version of spatie/image, v3. This package makes it very easy to manipulate images using PHP.

At the same time, we’ve also released a new major version of spatie/laravel-medialibrary. This is a powerhouse package that can associate all kinds of files with Eloquent models. The latest version of this package now uses spatie/image v3 under the hood for manipulating images.

In this blog post, I’ll explain why we made new major versions and how they can be used.

Read more

Craft emails that look good in each email client using MJML

by Freek Van der Herten – 5 minute read

In a perfect world, email clients can render HTML as good as major browsers. Unfortunately, this is not the case. Email clients don't support modern HTML and CSS niceties and have a lot of quirks to be mindful of. Making sure an HTML email looks good in the most used email clients takes a lot of work.

To make crafting HTML emails a lot more enjoyable, the folks at Mailjet created a solution called MJML, which stands for "Mailjet Markup Language." It's an easy-to-use abstraction layer over HTML.

We have created a new package called spatie/mjml-php to easily convert MJML to HTML using PHP. If you're using Sidecar, you'll be happy to know that we've also created a package called spatie/mjml-sidecar, to convert MJML to HTML using Sidecar.

In this blog post, I'd like to introduce the package to you.

Read more

Skipping tests conditionally in Pest

by Freek Van der Herten – 7 minute read

In this blog post, I'd like to show the easiest way to skip tests conditionally in tests. Using the simple technique, which can be used for other things besides skipping tests, you can make your tests much more flexible.

Read more