A trick to improve your class names
Sometimes it is not clear what the responsibility of a certain class is. This can be solved by adding a suffix to the class name.
In this section you can read posts I've written myself.
Sometimes it is not clear what the responsibility of a certain class is. This can be solved by adding a suffix to the class name.
Our team has released a new package called file-system-watcher. As the name implies, this package can watch changes in the file system and let you act on those changes.
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.
You can make your code more readable by moving all your exception messages to dedicated classes. We using this technique in all our projects and packages.
Out of the box, Laravel comes with the ability to generate "signed" URLs. These URLs have a hash in their query string that verifies that the URL was not modified.
At Flare, we use these signed URLs to add action links in mail notifications. The action links allow users to snooze and resolve errors right from the mail without having to be logged in. Pretty convenient!
My buddy Dries Vints noticed a slight drawback. He got a mail from Flare that contains these action links. A few hours after the mail arrived, he clicked one of the action links. This is what he saw.
Laravel's awesome closure based routing was probably one of the first features I fell in love with. I take it for granted now, but back in the days, such a simple way of adding a route felt like a glass of water in hell compared to the other frameworks.
Typically, you would only add routes that are necessary for the users of your app. Something that I have been doing for a long time is to create a routes file, called dev.php, with routes that can help with app development.
In this stream my colleague Brent and I continued our conversation about the foundations of event sourcing. This time we showed a shopping cart that we've built using Laravel and event sourcing.
If you're interested in learning more about event sourcing, be sure to check out our upcoming course on using event sourcing in Laravel.
Our team released a new package called spatie/fork. Using this package you can easily execute multiple pieces of code concurrently.
Here's the recording of Laravel Wordwide Meetup #8. My guests for this edition were Kai Sassnowski talking on the importance of DB indexes, and Sebastian De Deyne on how to use Vite in Laravel.
Last week, my colleague Ruben and I launched a major new feature at Flare: there's a new integration with GitHub that makes it possible to:
In this stream, Ruben and I will show you how you can use this integration and how it works under the hood.
I'm proud to announce yet another package by our team: spatie/laravel-interacts-with-payload. This one, which was inspired by a blog post by James Brooks, can inject data in all your jobs with just one line of code.
In this video, you'll see the package in action, I explain the internals and the tests. If you prefer reading, continue below the video.
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.
Original – 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.
Original – by Brent Roose and Freek Van der Herten – 4 minute read
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.