A package to dump anything to the log original
by Freek Van der Herten – 2 minute read – Edit
In this post, I'd like to show you a quick demo of our new package called laravel-log-dumper.
Originals — posts I've written myself.
by Freek Van der Herten – 2 minute read – Edit
In this post, I'd like to show you a quick demo of our new package called laravel-log-dumper.
by Freek Van der Herten – 11 minute read – Edit
Up until a few days ago, the real-time UI of Oh Dear (an uptime monitoring SaaS I run) was powered with web sockets. We recently replaced this with Livewire components.
In this blog post, I'd like to explain why and how we did that.
I'm going to assume that you already know what Livewire is. If not, head over to the Livewire docs. There's even a short video course on there. In short, Livewire enables you to create dynamic UIs using server-rendered partials.
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.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
by Freek Van der Herten – 7 minute read – Edit
A couple of weeks ago, we released Mailcoach: an affordable, self-hosted solution to send out newsletters. Installing it into an existing Laravel application is quite easy if you have experience with Laravel.
We wanted to make getting started with Mailcoach easier for those without experience with Laravel or PHP. Using our a 1-click-installer on the Digital Ocean marketplace you can set up an entire Mailcoach installation in a couple of minutes.
In this blogpost I'd like to show you how you can use the installer and how we built it.
by Freek Van der Herten – 3 minute read – Edit
One of my favourite new features of Laravel 7 are Blade components. The allow you to define custom html tags that are backed by Blade partials. In this blogpost I'd like to show you a couple very handy components.
This blogpost assumes that you already know how you can use Blade components.
by Freek Van der Herten – 1 minute read – Edit
Aren't you tired of having to think about which artisan command to execute? The spatie/laravel-random-command package takes that pain away. It provides a random command that will pick a random command and execute it.
by Freek Van der Herten – 16 minute read – Edit
Together with my buddy Mattias Geniar, I run Oh Dear, an uptime checker service on steroids.
Unlike most uptime trackers, Oh Dear doesn't only check your homepage, but every single page of your site. When we detect a broken link or some mixed content, we send a notification. Oh, and we provide status pages, like this one from Laravel and Flare too.
In this blog post, I'd like to show you how we use Livewire to render some complex forms in the UI of Oh Dear.
by Freek Van der Herten – 1 minute read – Edit
Last year, my buddy Dries and I organised the first edition of the Full Stack Europe Conference. We recorded all the session and intend to publish each one of them in the coming months.
We just finished processing the first video. Here's the keynote, titled "Building" by Jeremy Keith.
by Freek Van der Herten – 4 minute read – Edit
by Freek Van der Herten – 1 minute read – Edit
When working on open source code, I like using the latest version of PHP. When developers that are not on the latest version use the package, they might see syntax errors.
You might ask why Composer doesn't protect against this? When composer.json requires the latest version, how do devs, not on the latest version, can even install the package?
Well, there seemingly are a lot of people that only upgrade the PHP version on the command line. For handling web requests, they are unknowingly using an older version of PHP. Here's how to make sure you are on the latest version of PHP on both the CLI and for handling web requests.
by Freek Van der Herten – 9 minute read – Edit
A couple of months ago, my team released Mailcoach, a self-hosted solution to send out newsletters. It sends out mail via services like Amazon SES, Mailgun, Sendgrid, and Postmark. It can optionally track opens and clicks. When your email list grows, this is a much more cost-effective solution when compared to a service like Mailchimp.
Mailcoach can be used as a premium Laravel package or as a stand-alone app. When installed into a Laravel app, it can be greatly customized. The Mailcoach stand alone app can be used without knowing how to program.
Today we're releasing v2 of Mailcoach. It offers support for Laravel 7, html editors, and multiple mailers, together with a bunch of quality of life improvements. In this blog post, I'd like to walk you through these features and show some technical details.
by Freek Van der Herten – 3 minute read – Edit
In PHP 7.4 a widely requested feature landed: arrow function. In this blogpost I'd like to show you how I like to use them.
by Freek Van der Herten – 2 minute read – Edit
In this short post, I'd like to give you a tip on writing readable PHP.
by Freek Van der Herten – 2 minute read – Edit
Recently we started using GitHub Actions to test all our packages. You can read more about our general setup in this blog post.
For most of the packages, this works great. However, some of our packages, such as Laravel Tags, use JSON functions that are not available in SQLite. Luckily it's straightforward to use a database like MySQL in GitHub Actions.
by Freek Van der Herten – 1 minute read – Edit
by Freek Van der Herten – 1 minute read – Edit
In this video, which is part of the mailcoach video course, I show how I like to write my exceptions.
At the time of writing this post, we're running a contest where you can win a free mailcoach license.
by Freek Van der Herten – 1 minute read – Edit
Have you every come across confusing if statements with complex conditionals such as this? I bet you did!
// please kill me 🤯 if (!(($this->shipping_country == "GB" || (strcmp($this-status, "Valid") !== 0)) {
To me, this is completely unreadable.
In the video below I show how I deal with this situation. Spoiler: add some tests around it and break the conditionals apart.
This video is part of the Mailcoach video course. It contains many more videos on how to write clear code. You can use this coupon code to get a nice discount of $10.
YES-I-WANT-TO-WRITE-READABLE-CODE
by Freek Van der Herten – 2 minute read – Edit
laravel-tail is one of my favourite packages. When installed in a Laravel app it can be used to tail the log file. To tail a log file locally, you just have to issue this command: php artisan tail and it'll start tailing the latest log file (so it works for both daily and single log files). Any line…
by Freek Van der Herten – 2 minute read – Edit
In this short post, I'd like to share how I use BetterTouchTool in my daily work.
by Freek Van der Herten – 3 minute read – Edit
Our spatie/laravel-event-sourcing package is probably the best starting point for event sourcing in Laravel. It has excellent docs, that explain event sourcing from scratch, support for aggregates, projectors, and much more! It's all beautifully integrated in Laravel.
Recently we released v3 of the package. In this blogpost I'd like to walk you through the changes.
by Freek Van der Herten – 3 minute read – Edit
Our team released a new package called spatie/ssh. This package allows you to execute commands via an SSH connection.