Named arguments
I shiver at the sight of a function packed with too-many-to-read-at-a-glance arguments without a description. Especially boolean flags. Boolean flags lack context. Look at this code, I have no idea...
Sep 15th 2022

Creating installer commands for Laravel packages
One of the joys of using packages in the Laravel ecosystem is how easy they are to install. Packages can be pulled in using Composer, and Laravel will automatically discover...
Sep 7th 2022

Getting information about all the models in your Laravel app
I'm proud to announce that our team has released a new small package: spatie/laravel-model-info. Let's take a look at what this package can do. Using laravel-model-info This...
Sep 7th 2022

Granular interfaces
A few weeks ago a spec change for an application we’re working on forced us to refactor part of the codebase. It was...
Sep 5th 2022

You might not need `useRef` for that
According to the React maintainers, React developers reach for the useEffect hook too quickly. It is far from the only hook with many naive usages. Why won't we go...
Sep 2nd 2022

Increase performance by using Eloquent's `setRelation` method
While working on the upcoming Oh Dear redesign, I noticed that list that displays all sites of a team was very slow. To display that list, a lot of...
Aug 4th 2022

Using markdown in HTML (in markdown) in Hugo
The markdown specification allows you to inline HTML in a markdown document. This is a regular paragraph. <table> <tr>
Jul 25th 2022

Making sure routes, config and events of your Laravel app are cached in production
A typical Laravel application will likely have many routes, config files and possibly some events. In your development environment, these routes and config files will be loaded and registered in...
Jul 18th 2022

Introducing our new Laravel Options package
When developing web applications, you probably encounter a lot of places where someone needs to select one or more options in a select or multi-select. These select boxes always need...
Jul 8th 2022

Encrypting Laravel Eloquent models with CipherSweet
In your project, you might store some sensitive personal or credential data in your database. Should an unauthorised person get access to your DB, all this sensitive can be read. To...
Jul 1st 2022