In this section you can read posts I've written myself.

Handling CORS in a Laravel application

Original – by Freek Van der Herten – 5 minute read

Recently we released laravel-cors. This package can add the necessary CORS headers of your Laravel app. In this post I'd like to give a quick explanation of what CORS is and how you can use the package. What is CORS Imagine that all JavaScript code for domain X running in a browser would be able to…

Read more

The story behind our open source efforts

Original – by Freek Van der Herten – 15 minute read

This post was first published on 24daysindecember.net Chances are that you've never heard of my company Spatie. We specialise in creating Laravel applications for our clients. Our team is rather small: we consist of only 6 developers and one manager. On first glance we are just a web agency like…

Read more

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

An async map function

Original – by Freek Van der Herten – 3 minute read

Laravel has an excellent Collection class that has many useful operations. The class is also macroable. This means that you can add function to it at runtime by calling macro on it and passing a name and a closure. In our projects we tend to code up the same macro's over and over again. That's why…

Read more

Laravel-medialibrary v7 preview: media collections

Original – by Freek Van der Herten – 5 minute read

laravel-medialibrary is a package that can help handle media in a Laravel application. It can organise your files across multiple filesystems, generate thumbnails, optimize images and much much more. Like mentioned before on this blog my team and I are currently creating a new major version, v7,…

Read more

Laravel-medialibrary v7 preview: multi file downloads

Original – by Freek Van der Herten – 4 minute read

laravel-medialibrary is a powerhouse package that can help handle media in a Laravel application. It can organise your files across multiple filesystems, generate thumbnails, optimize images and much much more. My team and I are hard at work creating a new major version, v7, that adds a lot of…

Read more

Symfony now has an improved dump function

Original – by Freek Van der Herten – 2 minute read

Let's talk a little bit about Symfony's dump function. It's part of their VarDumper component. The function can dump a variable to the screen or browser in a nicer format than PHP's native var_dump. In the recently released Symfony 3.4 and Symfony 4 the function got a nice little improvement that…

Read more

murze.be turns three

Original – by Freek Van der Herten – 2 minute read

Three years ago I started this blog to share my bookmarks and interesting links with fellow developers. Like on the previous anniversaries I'd like to share some cool statistics from the past 12 months. For the period spanning from end november 2016 until end november 2017 my little blog served 591…

Read more

Reducing the size of a css file

Original – by Freek Van der Herten – 2 minute read

PurgeCSS is a tool that can reduce the filesize of a CSS file. It does this by removing any css classes that are not used. It can detect which CSS classes are used by scanning the source files of your application. In this tweet Jonathan Reinink shared how it can be configured in Laravel Mix: ???? I…

Read more

On migrating my blog from WordPress to a Laravel application

Original – by Freek Van der Herten – 12 minute read

Regular visitors will have noticed that last week this blog got a new coat of paint. This new layout isn't just a new WordPress theme. Things have changed on the backend as well. Previously my blog was powered by WordPress. I've migrated it to a custom built Laravel app. That app is open sourced.…

Read more

A beautiful webapp to fetch dns records

Original – by Freek Van der Herten – 3 minute read

Recently my company Spatie launched https://dnsrecords.io, a beautiful site to quickly lookup dns records. True to form, we also opensourced it, here is the sourcecode on GitHub. If you want to do some dns lookups in your own app, you'll be happy to know that we extracted the dns lookup…

Read more

A Laravel package to log HTTP requests

Original – by Freek Van der Herten – 1 minute read

Most of the sites we build for our clients contain some sort of contact form. For those client such forms are potentially critical to their business. Imagine for instance a real estate firm that generates leads with such forms. In most cases we will store the submitted values in the db and mail them…

Read more

Handling Stripe webhooks in a Laravel application

Original – by Freek Van der Herten – 5 minute read

In the project I'm currently working on I had to integrate Stripe webhooks. Stripe has great documentation on how to handle webhooks, but it still took a fair amount of time to get the integration just right. My solution for handling webhooks is pretty generic and reusable by others. I decided to…

Read more

New features in our packages

Original – by Freek Van der Herten – 3 minute read

Every time our team releases a package I have the habit of writing an introductory blogpost. But after the initial release most pages gain more features through PRs by the community and ourselves. Mostly these new feature go unnoticed. That's why I plan on regularly writings posts on noteworthy…

Read more

A trait to dynamically add methods to a class

Original – by Freek Van der Herten – 4 minute read

We recently released our newest package called macroable. It contains a trait that, when applied to class, can dynamically add methods to that class. This trait is basically a stand alone version of the macroable trait in Laravel. In this post I'd like to show you how you can use it, how it works…

Read more

Our vue-table-component got some nice improvements

Original – by Freek Van der Herten – 3 minute read

At beginning of the summer we released a new Vue component called vue-table-component. Our aim was to create a very easy to use Vue component to render a table with data. You can toy a little bit with the component on the demo page. Recently Seb and I worked on two cool new features which I want to…

Read more

What Laravel 5.5 means for our packages

Original – by Freek Van der Herten – 5 minute read

At Spatie we've released a plethora of Laravel packages. Now that Laravel 5.5 has been released most of our packages will get a new (major) version. In this blogpost I'd like to explain how we handle new releases of the framework and what it means for our packages. Preparing for release Laravel has…

Read more

Open-sourcing our guidelines

Original – by Freek Van der Herten – 7 minute read

At Spatie we recently launched a new site: guidelines.spatie.be. It contains articles on how we go about setting things up at Spatie and a collection of styleguides. The source code of the site is available on GitHub. In this blogpost I'd like to share why and how we created our guidelines site. Why…

Read more