Originals — posts I've written myself.

A package to extract text from a pdf original

by Freek Van der Herten – 1 minute read

For a project I needed to extract some text from a pdf. Although there were already a few packages that could to this, I still created spatie/pdf-to-text because I wanted something that was really easy to use. And also because it's fun creating packages. Under the hood a utility called pdftotext is…

Read more

Starting a newsletter original

by Freek Van der Herten – 1 minute read

I decided to add a newsletter to my blog. The plan is to send out a newsletter every two weeks. Newsletters will contain lots of interesting stuff for the modern PHP developer. You can expect quick tips, links to interesting tutorials, opinions and packages. Because I work with Laravel every day…

Read more

Join 9,500+ smart developers

Every month I share what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

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

A PHP 7 / Laravel package to create slugs original

by Freek Van der Herten – 2 minute read

Spatie, the company where I work, recently released a Laravel package called laravel-sluggable. It automatically creates unique slugs when saving a model. To install the package you just need to put the provided Spatie\Sluggable\HasSlug-trait on all models that have slugs. The trait contains an…

Read more

A package to check all links in a Laravel app original

by Freek Van der Herten – 1 minute read

A few weeks ago I made a cli tool to check the status code of all links on a site. It made use of a home grown crawler. Today the Laravel integration gets released. The new package called laravel-link-checker can log all broken links. By default, a link is considered broken if the status code of…

Read more

This blog is one year old original

by Freek Van der Herten – 2 minute read

Exactly one year ago the very first post on murze.be was published. This blog was mainly started as a way to bookmark interesting links. Along the way I shared programming tips, talked a bit about learning and gave some background on the Spatie packages. It's been a fun ride and looking at the…

Read more

Zero downtime deployments with Envoy original

by Freek Van der Herten – 4 minute read

Envoy is Laravel's official task runner. Using a Blade style syntax tasks can be defined that can be run both locally and remotely. At Spatie, we've been using Envoy for quite some time to deploy code on production servers. Summarized our trusty Envoy script did the following things: bringing the…

Read more

Validate (almost) anything in Laravel original

by Freek Van der Herten – 1 minute read

Laravel ships with some good validation capabilities. Form request validation is a nice way to make sure http requests pass valid data. To validate stuff that enters the application in some other way validators can be created manually. Unfortunately this is kinda verbose: $validator =…

Read more

Building a crawler in PHP original

by Freek Van der Herten – 4 minute read

When Spatie unleashes a new site on the web we want to make sure that all, both internal and external, links on it work. To facilitate that process we released a tool to check the statuscode of every link on a given website. It can easily be installed via composer: composer global require…

Read more

How to run your own npm repository server original

by Freek Van der Herten – 1 minute read

At Spatie we're constantly improving our application template called Blender. We love using packages to pull in functionality. Creating and using packages has many benefits. Though we try to create public packages that benefit the community, there are some packages that are very specific to Blender.…

Read more

On open sourcing Blender original

by Freek Van der Herten – 3 minute read

At Spatie we use a homegrown Laravel template called Blender. It's being used on nearly all our projects. When starting with a greenfield project we take a copy of Blender and make project specific changes in that copy. We built it because we want maximum flexibility and don't want to be hampered by…

Read more

A pjax middleware for Laravel 5 original

by Freek Van der Herten – 1 minute read

A few days ago Jeffrey Way published an interesting lesson on how to integrate pjax with Laravel. Pjax is jquery plugin that leverages ajax to speed up the loading time of webpages. It works by only fetching specific html fragments from the server, and client-side updating only certain parts of the…

Read more

A Fractal service provider for Laravel original

by Freek Van der Herten – 1 minute read

Today I released a new package called laravel-fractal. It provides a Fractal service provider for Laravel. If you don't know what Fractal does, take a peek at their intro. Shortly said, Fractal is very useful to transform data before using it in an API. Using Fractal data can be transformed like…

Read more

Redirect every request in a Laravel app original

by Freek Van der Herten – 1 minute read

I recently had to redirect every single request in a Laravel app. You might think that would be as easy as this: Route::get('/', function() { return redirect('https://targetdomain.com'); }); But that'll only redirect the "/" page. All other requests will return a 404.…

Read more

A middleware to check abilities on the route level original

by Freek Van der Herten – 1 minute read

Laravel's native authorization functionality allows you to define abilities a user can have. There are multiple ways to check if a user has a certain ability: via the facade, via the user model, within blade templates and within form requests. What Laravel doesn't provide out of the box is a…

Read more

A package to add roles and permissions to Laravel original

by Freek Van der Herten – 1 minute read

With the release of Laravel 5.1.1 last week the framework gained some nice Authorization features. It provides an easy way to define abilities (aka permissions). Checking if a user has certain abilities is very simple as well. The code powering authorization is a thing of beauty. If you're a…

Read more

Making string concatination readable in JavaScript original

by Freek Van der Herten – 1 minute read

At Laracon EU Frank De Jonge gave a talk on modern JavaScript development. It struck a cord with me. On a project I'm currently working on I'm learning a bit of React and using some of these neat new JavaScript features. One of those features is called template strings. It allows you do make string…

Read more

Laracon EU 2015 recap day two original

by Freek Van der Herten – 4 minute read

Today the second day of the Laracon EU took place in Amsterdam. Like yesterday there were a lot of interesting speakers. Jessica Rose started with a great talk on imposter syndrome. Impostor syndrome is the feeling that you don't know what you're doing, while everyone else is getting on fine. She…

Read more

Laracon EU 2015 recap day one original

by Freek Van der Herten – 3 minute read

I'm having the pleasure to attend Laracon EU. The event is located at a truly beautiful venue: the Royal Tropical Institute in Amsterdam. Today was the first day of the conference. Matt Stauffer kicked off Laracon EU with a great talk about empathy. He explained why it is a key trait that every…

Read more