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

Calling an invokable in an instance variable

Original – by Freek Van der Herten – 2 minute read

Invokables in PHP are classes that you can use as a function. They have been around since PHP 5.3 and have many interesting use cases. Here's a quick example. class Invokable { public function __invoke() { echo 'I have been invoked'; } } You can use it like this: // outputs 'I have been…

Read more

Making Nova fields translatable

Original – by Freek Van der Herten – 5 minute read

Laravel Nova is cool package to quickly create admin interfaces in a Laravel app. Unfortunately there's no support for multiple locales out of the box. A while ago we published a package called nova-translatable that makes any of the built in field types translatable. Using the package In order 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.

Our packages have been downloaded 20 million times

Original – by Freek Van der Herten – 3 minute read

At Spatie we do a lot of open source work. You can find a list of our packages on the open source section of our website. I'm proud to share that, according to Packagist, the Spatie packages have now been downloaded over 20 million times. The rate at which they are being downloaded is growing too.…

Read more

Easily switch PHP versions in Laravel Valet

Original – by Freek Van der Herten – 2 minute read

Besides enjoying some greenfield work, we often have to work on legacy projects at Spatie too. Sometimes those projects don't run on the latest PHP version. I this blogpost I'd like to show you a way to switch PHP version easily when using Laravel Valet. (I know you could also use Docker or…

Read more

Searching models using a where like query in Laravel

Original – by Freek Van der Herten – 5 minute read

For a project I'm working on I needed to build a lightweight, pragmatic search. In this blogpost I'd like to go over my solution. Searching Eloquent models Imagine you need to provide a search for users. Using Eloquent you can perform a search like this: User::query() ->where('name',…

Read more

My current setup (2018 edition)

Original – by Freek Van der Herten – 8 minute read

After tweeting out a screenshot, it often get questions around which editor, font or color scheme I'm using. Instead of replying to those questions individually I've decided to just write down the settings and apps that I'm using. IDE I mainly program PHP. Mostly I develop in PhpStorm. Here's a…

Read more

Use custom html components in your Blade views

Original – by Freek Van der Herten – 7 minute read

Today we launched our newest package called BladeX. In short this package provides you with an easy html like way to render custom html components in your Blade views. In this blogpost I'd like to introduce the package to you. A first example When building a server rendered app you're probably going…

Read more

Introducing BladeX View Models

Original – by Freek Van der Herten – 3 minute read

Earlier today we released BladeX, a package that allows you to use Blade components using a Vue inspired syntax. Read all about it in my previous blogpost. In the latest North Meets South podcast Jacob and Michael discussed BladeX and wondered if the package could be married with view models or…

Read more

A tags field for Nova apps

Original – by Freek Van der Herten – 4 minute read

A while ago I ditched the custom admin of this blog in favour of Laravel Nova. As you might have noticed every blog post on murze.be has some tags. Nova ships with many form fields but a field to use tags is not included out of the box. That's why I created my own tags field and released it as…

Read more

The Laracon US videos have been released

Original – by Freek Van der Herten – 1 minute read

Laracon US was held in July 2018 at the Museum of Science and Industry in Chicago. I had the pleasure of speaking at the conference. You can watch my talk on v7 of our medialibrary below. Though there isn't a playlist to hold them yet, you can view recordings of all other talks on the StreamACon…

Read more

Introducing our Laravel Nova packages

Original – by Freek Van der Herten – 3 minute read

Introducing our Laravel Nova packages Laravel Nova is a beautiful admin panel that was first showcased at Laracon 2018 by Laravel creator Taylor Otwell. Using Nova building rich admin panels is a breeze. Nova was released today. Taylor was kind enough to give us early access to Nova shortly after…

Read more

Announcing the Full Stack Europe conference

Original – by Freek Van der Herten – 1 minute read

The past few months my buddy Dries and I have been preparing a brand new conference called Full Stack Europe. The conference will take place in the city of Antwerp somewhere in spring or early summer of 2019. With the conference, we want to welcome every type of developer, wether you identify…

Read more

A few notes about the frontend of the renewed spatie.be

Original – by Willem Van Bockstal – 5 minute read

Before we moved in to our new offices in 2014, we quickly set up a temporary one-page website, initially only in Dutch. It lasted for 4 years and bursted out of its frames ever since, because… hmm … no priority, no time. A new site was like a running joke for a long time, until Laracon US 2018…

Read more

A new website for Spatie: backend highlights

Original – by Freek Van der Herten – 7 minute read

For the first time in 4 years we completely redesigned our company website. We launched it today. The site is a simple Laravel app with some technical niceties. True to form we also open sourced the app, you can find the code in this repo on GitHub. In this blogpost I'd like you to give you a tour…

Read more

A short introduction to laravel-event-projector

Original – by Freek Van der Herten – 1 minute read

The last few months I've been working on a package called laravel-event-projector. This package aims to be a simple and very pragmatic way to get started with event sourcing in Laravel. Ahead of it's release, which will happen in a few days, I've recorded a small video introduction. You can find the…

Read more

Breaking Laravel's firstOrCreate using race conditions

Original – by Freek Van der Herten – 4 minute read

Recently I was working on a client project where a data import was performed via queues. Each record was imported in its own queued job using multiple queue workers. After the data import was done we had more rows than expected in the database. In this blogpost I'd like to explain why that happened.…

Read more

The open source department at Spatie is doing overtime

Original – by Freek Van der Herten – 3 minute read

Bad title because we don't do overtime at Spatie, but our team has been very busy putting out new open source stuff. In the past weeks our team has released three new packages. In this post I'd like to quickly introduce them too you. sheets First up is spatie/sheets, created by Sebastian. This…

Read more

A package that makes event sourcing in Laravel a breeze ?

Original – by Freek Van der Herten – 11 minute read

In most applications you store the state of the application in the database. If something needs to be changed you simply update values in a table. When using event sourcing you'll take a different approach. All changes to application state are stored as a series of events. The key benefit here is…

Read more