Stay up to date with all things Laravel, PHP, and JavaScript.

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.

Implementing event sourcing: testing aggregates

Original – by Freek Van der Herten – 4 minute read

Earlier this year we released v2 of laravel-event-sourcing. This package is probably the easiest way to getting started with event sourcing in Laravel. A significant feature of v2 was the addition of aggregates.

Today we released another new version of the package that adds test methods. These methods allow you to verify if the aggregate behaves correctly. In this post, I'll show you an example and explain how the test methods are implemented.

Read more

A Shifty Email Bug

Link – – jasonmccreary.me

Jason McCreary, creator of Laravel Shift, wrote a post mortem on a problem where too many mails were sent.

It was 7:07 am. I woke up to 56 emails, 17 tweets, 9 Slack messages, and 4 telegrams. All of which alerting me my SaSS product had sent 3,625 email messages to 1,544 users overnight. I am Jack's cold sweat. πŸ˜…

Read more [jasonmccreary.me]

How to add webmentions to a Laravel powered blog

Original – by Freek Van der Herten – 8 minute read

The comment section of this blog used to be powered by Disqus. At its core, Disqus works pretty well. But I don't like the fact that it pulls in a lot of JavaScript to make it work. It's also not the prettiest UI. I've recently replaced Disqus comments with webmentions. If you reply to, like or…

Read more

Advanced internationalization system for Vuex

Link – – nicolas-beauvais.com

Nicolas Beauvais wrote a nice blogpost on how he went about adding support for internationalization to his app.

When working on web applications, translation strings are typically stored in the backend of your app while they’re mostly used in the frontend. This is the main challenge because you need to communicate the translations from your backend to your frontend code.

Read more [nicolas-beauvais.com]

Verify that your site is still online after a deploy

Link – – ohdear.app

At the Oh Dear blog, my colleague Mattias explains how to use our service to verify that your site is still online after a deploy.

You can use our API to trigger an on demand run of both the uptime check and the broken links checker. If you add this to, say, your deploy script, you can have near-instant validation that your deploy succeeded and didn't break any links & pages.

Read more [ohdear.app]

Start testing your Laravel applications

Link – – jasonmccreary.me

Jason McCreary wrote an epic blogpost on how to get started with tests in a Laravel app. I wish I could have read this when I started out with testing.

This brings me to the next common response, we don’t know where to start testing. This comes in two forms. The first form is quite literally we don’t know which test to write first. The second form is more not knowing how to write the first test. ... Today, I want to focus on getting started with testing your Laravel applications.

Read more [jasonmccreary.me]

Adding webmentions to my blog

Link – – sebastiandedeyne.com

A few weeks ago, my colleague Seb added webmentions to his blog.

I first noticed webmentions in the wild on Hidde de Vries’ blog about two years ago. Last week it finally happened, I added webmention support to my blog too! Well, partial support at least. I’m now receiving and displaying webmentions. Sending them out is a project for another day.

Read more [sebastiandedeyne.com]

Going serverless with Hugo and Netlify

Original – by Freek Van der Herten – 5 minute read

Our team releases a lot of open source packages. All of our packages are well documented. For the smaller packages, we use a simple readme on GitHub. The bigger packages, like medialibrary and event projector get documented on our documentation site. We recently moved our site from a Digital Ocean…

Read more

The case of the Laravel TestCase

Link – – timacdonald.me

Tim MacDonald, a freelance software developer based in Sydney, investigates how to make Laravel tests run faster. Turns out you a lot can be gained by caching the config.

I saw a conversation on Twitter the other day discussing how Laravel was slowing down a test suite. I decided I wanted to dig into this and see if there was anything to it.

Read more [timacdonald.me]

Creating encrypted backups of Laravel apps

Link – – simonkollross.de

Simon Kollross explains how to use our laravel-backup package to create an encrypted backup of your Laravel based app.

You should always encrypt backups of your apps and securely transfer them to one or multiple backup destinations. If you encrypt the backups on your server and transfer only the encrypted version, your backups are stored encrypted at rest in your backup destination. Not even your backup storage provider is able to read them.

Read more [simonkollross.de]

How to handle front-end authorization using Laravel, Inertia and TypeScript

Original – by Freek Van der Herten – 6 minute read

Recently Jeffrey Way published a video titled "Frontend Authorization Brainstorming" on Laracasts. In that video, he shows three ways of passing authorization results to the front-end.

Currently I'm working on a big project that uses Inertia, React and TypeScript. In this blog post, I won't cover those things in detail, but I'd like to show you have we, using those technologies, pass authorization (and routes) to the front-end.

Read more

Nobody really owns product work

Link – – m.signalvnoise.com

A nice insight by Basecamp engineer Jonas Downey.

Whatever ownership you have over an individual contribution is immediately forfeited the moment you commit the code. At that moment, the work becomes part of the ever-evolving organism that comprises a software system.

Read more [m.signalvnoise.com]