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

Dealing with expired signed URLs in Laravel

Original – by Freek Van der Herten – 2 minute read

Out of the box, Laravel comes with the ability to generate "signed" URLs. These URLs have a hash in their query string that verifies that the URL was not modified.

At Flare, we use these signed URLs to add action links in mail notifications. The action links allow users to snooze and resolve errors right from the mail without having to be logged in. Pretty convenient!

My buddy Dries Vints noticed a slight drawback. He got a mail from Flare that contains these action links. A few hours after the mail arrived, he clicked one of the action links. This is what he saw.

Read more

Develop faster by adding dev routes file in a Laravel app

Original – by Freek Van der Herten – 3 minute read

Laravel's awesome closure based routing was probably one of the first features I fell in love with. I take it for granted now, but back in the days, such a simple way of adding a route felt like a glass of water in hell compared to the other frameworks.

Typically, you would only add routes that are necessary for the users of your app. Something that I have been doing for a long time is to create a routes file, called dev.php, with routes that can help with app development.

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.

How Flare's GitHub integration works under the hood

Original – by Freek Van der Herten – 1 minute read

Last week, my colleague Ruben and I launched a major new feature at Flare: there's a new integration with GitHub that makes it possible to:

  • create a GitHub issue directly on a Flare error
  • associate a GitHub issue with a Flare error by mentioning a Flare URL in the GitHub issue
  • automatically resolve an error on Flare when you close the GitHub issue
  • automatically close a GitHub issue when you resolve an error in Flare

In this stream, Ruben and I will show you how you can use this integration and how it works under the hood.

Read more

Data Transfer Object v3 has been released

Original – by Brent Roose and Freek Van der Herten – 4 minute read

We've released a new major version of spatie/data-transfer-object. This package makes it easy to create objects that have a certain shape. Properties can even be validated.

In this post I'd like to tell you more the package.

Read more

Handling console signals in Laravel

Original – by Freek Van der Herten – 7 minute read

When you cancel a long-running artisan command with Ctrl+C, a SIGINT signal is sent by the operating system to the PHP process. You can use this signal to perform some cleanup quickly.

Symfony 5.2 introduced support for handling signals in commands.

We've released a package called spatie/laravel-signal-aware-commands that provides a substantial improvement to how you can use these signals in a Laravel app. In this blog post, I'd like to tell you all about it.

Read more

Why and how you should remove inactive users and teams

Original – by Freek Van der Herten – 8 minute read

There are many SaaS applications that allow potential new customers to try out the service using a trial period. Of course, not everybody will convert. After the trial period is over, some people will not use the service anymore.However, if nothing is being done about it, their email address and…

Read more

Mailcoach v4 has been released: drip campaigns, automations, mail templates and much more

Original – by Freek Van der Herten – 4 minute read

I'm proud to announce that Mailcoach v4 has been released. Mailcoach already was a great solution to send out bulk emails affordably. With an entirely refreshed UI and new capabilities, Mailcoach now becomes a more powerful platform for all things email:

We've also rewritten our extensive documentation.

In this blog post, I'd like to give you a tour of everything Mailcoach can do.

Read more

Building a Laravel package from scratch

Original – by Freek Van der Herten – 1 minute read

In this streaming session, you can see me build up the package from scratch.You can find the code seen in the stream in the spatie/laravel-remote repo on GitHub.If you want to learn how to build PHP and Laravel packages, consider purchasing our Laravel Package Training video course.

Read more

Introducing monthly playlists from team Spatie

Original – by Freek Van der Herten – 2 minute read

At Spatie, each one of our team members loves music. Scattered across our office are a couple of HomePods. Everyone in our team is free to stream his favourite music for others to hear (of course at an acceptable volume so everyone can still work).

This is a great way to discover music. In my mind, any automated algorithm that picks music for you is trumped what your friends and peers suggest to you.

Because of the pandemic, this way of sharing music with each other was lost. That's why our team will from now on create monthly playlists. The process is easy: every month we will choose a theme for the playlist and each team member picks two or three tracks.

The first theme is "Late Night Something" (it's not "late night coding" because not everyone on our team codes.

cover

Here's our playlist on Apple Music. And here is the same playlist on Spotify.

Here's at the Spotify embed so you can listen from your browser too.

Read more