In this section you can read posts I've written myself.
Sending a welcome notification to new users of a Laravel app
My team and I currently building Mailcoach, a solution to self-host newsletters and email campaigns. In Mailcoach you can create new users to use the app.
How should these new users be onboarded? The easy way out would be to send these new users a default password reset notification to those users, but that isn't a good first experience. The default auth scaffold by Laravel doesn't help us here: it only contains functionality to log in and to let users register themselves.
To onboard new users created by other users, I've created a package called laravel-welcome-notification
which can send a welcome notification to new users that allows them to set an initial password.
In this blogpost I'd like to explain how you can use the package).
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.
Improving Artisan commands
In this small blog post, I'd like to give you a couple of tips to make your Artisan commands better.
A PHP package to read and write simple Excel or CSV files
For a couple of projects I needed to read and write a couple of very large Excel and CSV files. I didn't find a good package that does this so I decided to create one myself. Under the hood it uses generators, so memory usage will remain low, even when working with large files.
In this blogpost I'd like to walk you through spatie/simple-excel.
Getting started with Domain Oriented Laravel
A couple of days ago my colleague Brent published a blogpost on Domain Oriented Laravel. In short, he makes the case for organising your code around business concepts or features. That might sound very "heavy" or daunting, but it's actually for easy to get started with.
In this short video I explain how you can use PhpStorm to refactor your code. Make up your own mind if you need this in your projects.
My current setup (2019 edition)
After tweeting out a screenshot, it often get questions around which editor, font or color scheme I'm using. Instead of replying to those questions individually I've decided to just write down the settings and apps that I'm using.
The mixin PHP DocBlock
When using PHP, you've probably used DocBlocks. They can be used to add additional information that can't be inferred by looking at the source code alone. DocBlocks can be used by IDEs, like PhpStorm, to improve autocomplete suggestions.
In this blogpost, I'd like to highlight a not so well known DocBlock: mixin.
The value of the void typehint in PHP
When the void
typehint was introduced in PHP 7.1. There was some debate about it. Some people wondered if it is beneficial to type nothing? I was one of them. Meanwhile, I changed my opinion on it. In this short post, I'd like to give you a small example where I think void
shines.
A job middleware to rate limit jobs
Recently we released a new small package called laravel-rate-limited-job-middleware. As the name implies, this package can be used to limit how many times a job may be executed in a given amount of time.
In this short blog post, I'd like to introduce the package to you.
A package that adds resource links to your Laravel API resources
At Spatie we have several projects where the UI is rendered using JavaScript (we're big fans of Inertia). The backend and routes are defined in the Laravel app. The backend sends information to the frontend using API resources.
We often add the available routes the frontend can use as links
property on the resource. To avoid having to add all routes manually, my colleague Ruben released a package, called laravel-resource-links that can automatically add resource links to the API resource.
In this post, I'd like to introduce the package to you.
Event store optimizations in laravel-event-sourcing
About a year ago, we released laravel-event-projector. It focused on adding projectors, an important concept in event sourcing, to Laravel.
After the release of the package, we continually kept improving it. We added aggregates, a way to test those, a brand new section in the our documentation that explains event sourcing from scratch, and DX improvements all across the board.
We now feel confident that the package is a good starting point for getting started with event sourcing in Laravel. That's why we're renaming the package to laravel-event-sourcing
.
Creating beautiful status pages using Oh Dear!
My buddy Mattias and I are running an uptime checker service called Oh Dear. Earlier this week, we've launched a new major feature: status pages.
In this blog post, I'd like to walk you through what status pages have to offer. We'll also dive deep in some technical details of the underlying Laravel app.
Generating speaker cards using Tailwind and Laravel
I'm currently organizing the Full Stack Europe conference. The first edition will be on 23 - 25 October in the beautiful city of Antwerp, Belgium. I believe that the best apps or sites aren't built by programmers. They're built by teams. That's why we designed this conference for everybody and don't stick to just one aspect of programming.
Ignition: a new error page for Laravel
Today at Laracon EU, Marcel Pociot and I unveiled Ignition, a beautiful new error page for Laravel. It is the new default error screen in Laravel 6 and you can manually install it into Laravel 5 applications. In this blog post, I'd like to tell you all about it.
Flare: an error tracker built for Laravel apps
Watch the Flare reveal live
These past eight months Marcel Pociot, me and our teams at Beyond Code and Spatie have been working on a secret project called Flare. We believe that Flare is going to change the way you work with Laravel. To be kept in the loop subscribe to our mailinglist.
We are going to launch it this Friday at Laracon EU at 16.30 local time (15:30 CET). The Laravel News YouTube channel will live stream the launch. You can watch the stream right below.
Supercharging common controllers
From time to time our team needs to create fairly complicated CRUD interfaces from scratch. While this isn't rocket science, there surprisingly aren't that many good resource out there on how to do this. That's why our team dove in and published a couple of packages that can help create modern CRUD…
Implementing event sourcing: testing aggregates
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.
These test methods were inspired by the awesome testing methods Frank De Jonge made in his Eventsauce package.
How to add webmentions to a Laravel powered blog
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…
Going serverless with Hugo and Netlify
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…