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

Why we are sponsering our local user group

Original – by Freek Van der Herten – 3 minute read

At the end of this month our local user group, PHP Antwerp, will hold it's third meetup. It'll be sponsered by Spatie, of which I'm a co-owner. In this post I'd like to explain why we are sponsering this event. Of course as a company it's good to get our name out there but there are other more…

Read more

Say goodbye to manually creating a robots.txt file

Original – by Freek Van der Herten – 1 minute read

If you don't want a site to be indexed by search engines you must place a robots.txt file. Typically you don't want anything indexed except production sites. Today Spatie released a new package called laravel-robots-middleware. It was coded up by my colleague Sebastian. Instead of you having to…

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.

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

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