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

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.

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:

dashboard

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

How to check which version of PHP you are running

Original – by Freek Van der Herten – 1 minute read

When working on open source code, I like using the latest version of PHP. When developers that are not on the latest version use the package, they might see syntax errors.

You might ask why Composer doesn't protect against this? When composer.json requires the latest version, how do devs, not on the latest version, can even install the package?

Well, there seemingly are a lot of people that only upgrade the PHP version on the command line. For handling web requests, they are unknowingly using an older version of PHP. Here's how to make sure you are on the latest version of PHP on both the CLI and for handling web requests.

Read more

Mailcoach v2 has been released with support for custom HTML editors and multiple mailers

Original – by Freek Van der Herten – 9 minute read

A couple of months ago, my team released Mailcoach, a self-hosted solution to send out newsletters. It sends out mail via services like Amazon SES, Mailgun, Sendgrid, and Postmark. It can optionally track opens and clicks. When your email list grows, this is a much more cost-effective solution when compared to a service like Mailchimp.

Mailcoach can be used as a premium Laravel package or as a stand-alone app. When installed into a Laravel app, it can be greatly customized. The Mailcoach stand alone app can be used without knowing how to program.

Today we're releasing v2 of Mailcoach. It offers support for Laravel 7, html editors, and multiple mailers, together with a bunch of quality of life improvements. In this blog post, I'd like to walk you through these features and show some technical details.

Read more