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

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

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.

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 package to automatically discover routes in a Laravel app

Original – by Freek Van der Herten – 9 minute read

I'm proud to announce that our team has released a new package called spatie/laravel-route-discovery. This package can be used to automatically discover and register routes by looking at your controllers and views. Of course, you can also still register routes like you're used to in a routes file.

In this blog post, I'd like to tell you all about this package.

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

Avoid describing your data multiple times in a Laravel app using laravel-data

Original – by Ruben Van Assche – 12 minute read

In the vast majority of applications you work with data structures. Sometimes that data is described multiple times. Think for instance of a form request that tries to validate a blog post model, and an API transformer class for that same blog post model. Changes are that both classes describe the same properties.

Using our new laravel-data package, those structures only need to be described once.

Read more