Controlling the flow of time in your tests original
Our test-time package makes writing tests, for code that makes its decisions based on the current time, very easy.
Here's how we use the package for some tests in Mailcoach.
Originals β posts I've written myself.
Our test-time package makes writing tests, for code that makes its decisions based on the current time, very easy.
Here's how we use the package for some tests in Mailcoach.
by Alex Vanderbist and Freek Van der Herten β 3 minute read
I'm proud to announce that our team has released a new package called spatie/laravel-stats. This package is a lightweight solution for summarizing changes in your database over time.
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.
"As a Laravel developer, this is the one newsletter I most look forward to. Freek has a talent for distilling packages or techniques down to something immediately useful - one tip can save you hours and even weeks. It's concise and practical and highly relevant."
We've released a new major version of spatie/data-transfer-object. This package makes it easy to create objects that have a certain shape. Properties can even be validated.
π Need self-validating PHP objects? Here you go!https://t.co/osPCSr0qu8
— Freek Van der Herten π (@freekmurze) April 2, 2021
Gotta love PHP 8
Very nice work by @brendt_gd pic.twitter.com/Sn1mS7R8Sv
In this post I'd like to tell you more the package.
When you cancel a long-running artisan command with Ctrl+C, a SIGINT signal is sent by the operating system to the PHP process. You can use this signal to perform some cleanup quickly.
Symfony 5.2 introduced support for handling signals in commands.
We've released a package called spatie/laravel-signal-aware-commands that provides a substantial improvement to how you can use these signals in a Laravel app. In this blog post, I'd like to tell you all about it.
In this stream, you'll see me lay the foundations for the spatie/laravel-signal-aware-command package.
There are many SaaS applications that allow potential new customers to try out the service using a trial period. Of course, not everybody will convert. After the trial period is over, some people will not use the service anymore. However, if nothing is being done about it, their email address andβ¦
I'm proud to announce that Mailcoach v4 has been released. Mailcoach already was a great solution to send out bulk emails affordably. With an entirely refreshed UI and new capabilities, Mailcoach now becomes a more powerful platform for all things email:
We've also rewritten our extensive documentation.
In this blog post, I'd like to give you a tour of everything Mailcoach can do.
Here's a recording of the Laravel Worldwide Meetup #7.
Miguel Piedrafita talked about the various options of signing in with Laravel. After that, Caneco shared some of the secrets behind the Laracon Online website.
Using the newly released spatie/laravel-remote package, you can quickly execute Artisan commands on a remote server.
Here's an example that will clear the cache on the remote server.
php artisan remote cache:clear
In this blog post, I'd like to tell you all about it!
In this streaming session, you can see me build up the package from scratch. You can find the code seen in the stream in the spatie/laravel-remote repo on GitHub. If you want to learn how to build PHP and Laravel packages, consider purchasing our Laravel Package Training video course.
At Spatie, each one of our team members loves music. Scattered across our office are a couple of HomePods. Everyone in our team is free to stream his favourite music for others to hear (of course at an acceptable volume so everyone can still work).
This is a great way to discover music. In my mind, any automated algorithm that picks music for you is trumped what your friends and peers suggest to you.
Because of the pandemic, this way of sharing music with each other was lost. That's why our team will from now on create monthly playlists. The process is easy: every month we will choose a theme for the playlist and each team member picks two or three tracks.
The first theme is "Late Night Something" (it's not "late night coding" because not everyone on our team codes.
Here's our playlist on Apple Music. And here is the same playlist on Spotify.
Here's at the Spotify embed so you can listen from your browser too.
In this talk, given at Laracon Online 2020, I show a simple strategy to make any Laravel app tenant aware using our laravel-multitenancy package.
Earlier this year, we released Ray, a desktop app that allows you to debug faster. Instead of dumping values to the browser or console, Ray allows you to display debugging information beautifully in a dedicated window.
Since launch, Ray helps you debug local projects. Today, we're adding the most requested feature to Ray: the ability to connect to remote servers. All output of the ray() call, will be sent securely from your remote server to the local app via SSH.
Using this feature, you can quickly investigate problems on your production servers that you are unable to recreate locally.
In this short video you'll see a quick demo!
We've released a new package called spatie/laravel-prefixed-ids. In this post, I'd like to tell you all about it.
When a site is down, Oh Dear sends a notification every hour. Since last year, our notifications can be snoozed for a fixed amount of time (5 minutes, 1 hour, 4 hours, one day).
In the evenings and weekends, our users might not want to receive repeated notifications. That's why we've added a nice human touch: all notifications can now be snoozed until the start of the next workday.
In this blog post, I'd like to share some of the code that powers this feature. We'll focus on how the start of the next workday is calculated.
Using our laravel-mail-preview package, you can quickly display mails that are sent by your Laravel application in your browser.
Today, we've released v5 of the package. In this blog post, I'd like to tell you all about it.
In almost every Laravel package, there is a ServiceProvider class responsible for registering bindings package resources such as config files, views, migrations, ...
While preparing a workshop that I gave on package development, I watched some videos of our own Laravel package training video course again. While watching the videos on using the service provider again, I had the idea to simplify how resources can be registered.
Meanwhile, I've fleshed out the idea and release it as a new package called laravel-package-tools. In this blog post, I'd like to introduce the package to you.
I'm proud to announce the immediate release of Ray, a desktop app that vastly improves your debugging experience. Ray is a dedicated window to send dumped values to. It has a lot of features that help you find and fix bugs faster.

Ray is available for macOS, Windows and Linux.
In this blog post, I'd like to share why and how we've built Ray. If you just want to know what Ray is, head to the Ray homepage.
These past few months, my team and I have worked on something that we think will be very usefull for PHP and Laravel devs.
At 14:30 CEST you can see me release it live in this stream on YouTube.
I've already shown our project to a couple of friends. This is what they said:
This is a really innovative and exciting project in a space that doesn't have many options.
— Jess Archer (@jessarchercodes) January 7, 2021
And with very promising Linux support in the pipeline too! π
We're definitely talking about a daily developer experience improvement! https://t.co/tDHgsn7NiG
For amateur developers only! https://t.co/srNgSM21ym
— Michael Dyrynda (@michaeldyrynda) January 6, 2021
Get ready for something awesome! https://t.co/1nr5VbO4nY
— James Brooks (@jbrooksuk) January 6, 2021
I already had the chance to take a look at it. It looks very promising. I think you will like it :) https://t.co/viITNC8QSt
— Stefan Bauer (@stefanbauerme) January 6, 2021