Announcing the Laravel Worldwide Meetup

Original – by Freek Van der Herten – 3 minute read

I'm happy to announce the official Laravel Worldwide Meetup. This monthly meetup will be streamed via YouTube. The first edition will be held on 14th July at 18:00 UTC.

There is a select group of people, sometimes jokingly referred to as "The Elite" that you often see speaking at Laracons and other events. Even though you will probably see some of these fine artisans on the stream, the main goal of this meetup is to introduce new speakers to the community.

Read more

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

Follow me on Twitter. I regularly tweet out programming tips, and what I myself have learned in ongoing projects.

Every two weeks 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.

Adding try/catch to Laravel collections

Original – by Freek Van der Herten – 6 minute read

A few weeks ago, Jmac tweeted out an excellent idea. What if we could use try and catch in a collection chain?

Meanwhile, Jmac and I did a few code pairing sessions to work on a possible implementation. We've added try and catch methods to the laravel-collection-macros package.

In this blog post, I'd like to share what you can do with these methods and how they work under the hood.

Read more

A package to schedule Artisan commands at sub-minute frequencies

Original – by Freek Van der Herten – 3 minute read

Laravel's native scheduler allows you to schedule Artisan commands to run every minute. For a project I'm working on I needed to schedule a command to run every few seconds. I found a good solution to do this using an ReactPHP powered event loop. Because this solution could be helpful for others as well, I decided to package it up.

Using the laravel-short-schedule package, you can schedule artisan commands to run every second or even lower frequencies. In this blogpost I'd like to introduce the package.

Read more

Improving readability by decreasing indentation

Original – by Freek Van der Herten – 1 minute read

Readability of code can be vastly improved by decreasing indentation. In this video we'll reverse conditions and early returns to accomplish this. If you want to see more videos like this one, head over to the video section at Spatie.

Read more

Learn how to create PHP and Laravel packages using our new premium video course

Original – by Freek Van der Herten – 4 minute read

Together with my colleagues at Spatie, we have produced over 200 packages with more than 75 million downloads in total.

We learned a lot by quality packages like laravel-permission, laravel-backup, browsershot, laravel-medialibrary, and many more. We feel we have a pretty good workflow to produce reliable, readable, and maintainable packages.

We want to share the knowledge we have built up over the year with you in our new premium video course, titled Laravel Package Training.

Read more

How we created over 200 PHP and Laravel packages

Original – by Freek Van der Herten – 15 minute read

I work at and co-own a company named Spatie, which specializes in creating large Laravel applications for our clients. Our team is rather small: we consist of only 10 people. At first glance we are a software development company like there are so many others. But there’s one thing that sets our company apart: we have an open source first policy. We try to create and contribute to open source as much as possible.

Currently we have around 200 open source repositories on GitHub. Our packages have been downloaded nearly 75 million times. They are being downloaded 4,5 million times each month. Probably we will hit 100 million downloads by the end of this year.

We've also just released our premium video course, titled Laravel Package Training. In this course, we use our experience to teach you how to build reliable and maintainable packages.

This all did not happen overnight. Read on to learn the story behind our open source efforts.

Read more

An unopinionated package to make Laravel apps tenant aware

Original – by Freek Van der Herten – 9 minute read

Today we released a package to make Laravel apps tenant aware, called laravel-multitenancy. The philosophy of this package is that it should only provide the bare essentials to enable multitenancy.

The package can determine which tenant should be the current tenant for the request. It also allows you to define what should happen when switching the current tenant to another one.

It works for multitenancy projects that need to use one or multiple databases.

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

Read more

Building a realtime dashboard powered by Laravel, Livewire and Tailwind (2020 edition)

Original – by Freek Van der Herten – 23 minute read

At Spatie we have a TV screen against the wall that displays a dashboard. This dashboard displays the tasks our team should be working on, important events in the near future, which tasks each of our team members should be working on, what music they are listening to, and so on. Here's what it looks like:


This dashboard is built using our laravel-dashboard package. It will allow you to built a similar dashboard in no time.

In this blogpost I'd like to walk you through both the dashboard and the package.

Read more

Mixing event sourcing in a traditional Laravel app

Original – by Freek Van der Herten – 9 minute read

Together with my colleague Brent, I'm working on designing the architecture of a massive Laravel application. In that application, we'll have traditional parts and event sourced parts. In this blog post, I'd like to give a practical example of how we think to achieve this.

Read more

Replacing web sockets with Livewire

Original – by Freek Van der Herten – 11 minute read

Up until a few days ago, the real-time UI of Oh Dear (an uptime monitoring SaaS I run) was powered with web sockets. We recently replaced this with Livewire components.

In this blog post, I'd like to explain why and how we did that.

I'm going to assume that you already know what Livewire is. If not, head over to the Livewire docs. There's even a short video course on there. In short, Livewire enables you to create dynamic UIs using server-rendered partials.

Read more

Using the 1-click-installer to set up Mailcoach in no time

Original – by Freek Van der Herten – 7 minute read

A couple of weeks ago, we released Mailcoach: an affordable, self-hosted solution to send out newsletters. Installing it into an existing Laravel application is quite easy if you have experience with Laravel.

We wanted to make getting started with Mailcoach easier for those without experience with Laravel or PHP. Using our a 1-click-installer on the Digital Ocean marketplace you can set up an entire Mailcoach installation in a couple of minutes.

In this blogpost I'd like to show you how you can use the installer and how we built it.

Read more

Building complex forms with Laravel Livewire in Oh Dear

Original – by Freek Van der Herten – 16 minute read

Together with my buddy Mattias Geniar, I run Oh Dear, an uptime checker service on steroids.

Unlike most uptime trackers, Oh Dear doesn't only check your homepage, but every single page of your site. When we detect a broken link or some mixed content, we send a notification. Oh, and we provide status pages, like this one from Laravel and Flare too.

In this blog post, I'd like to show you how we use Livewire to render some complex forms in the UI of Oh Dear.

Read more