Originals — posts I've written myself.

Learn how to write readable PHP that is a joy to maintain original

by Freek Van der Herten – 8 minute read

I'm proud to announce that our new premium course on writing readable PHP is now available. It's called Writing Readable PHP.

This course contains a collection of bite-size tips (both in written form and videos) that make your code a joy to read for your co-workers and future self. These tips are aimed towards developers who know the basics of PHP and want to improve their craft. As a bonus, you'll learn to use static analysis to ensure that your code is understandable and correct.

Writing Readable PHP has been created by our team and Christoph Rumpel. It contains our combined knowledge on how to write the best PHP possible.

Read more

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

Avoid using else original

by Freek Van der Herten – 1 minute read

Using else often encourages complexer code structure, makes code less readable. In most cases you can refactor it using early returns.

Read more

Code that breathes original

by Brent Roose & Freek Van der Herten – 2 minute read

Have you ever needed to maintain a project that wasn't yours? A project that, when you first opened it, gave you chills down your spine? Even without reading the code in detail, you could already tell it was a mess.

Read more

A Laravel package to monitor the health of your application original

by Freek Van der Herten – 15 minute read

I'm proud to announce that we've released a new package called Laravel Health. As the name implies, this package can be used to monitor the health of your Laravel application.

It offers many checks out of the box, and an easy way to create custom checks. When something is wrong, you can get a notification, or view the status on a dashboard.

The package also offers deep integration with Oh Dear, allowing for even more robust monitoring

I want to tell you all about it in this blog post. Let's go!

screenshot

Read more

A bash function to run tests for both PHPUnit and Pest original

by Freek Van der Herten – 2 minute read

I've used this little bash alias for many years to quickly run the tests inside of a project.

alias p="vendor/bin/phpunit"

With this alias in place, I can run the tests by typing "p" on the CLI. Nice!

For a long time, everything was great! But then, Pest appeared on the scene. It's an alternative test runner for PHP with a high focus on developer experience.

Read more