Improve Passing Booleans in PHP original
Passing booleans to a method can be code smell, as it is not clear what a boolean does by reading the calling code.
Passing booleans to a method can be code smell, as it is not clear what a boolean does by reading the calling code.
Unlike traditional Long-polling using AJAX requests, where multiple requests are sent to the server and a new connection is established each time, event streams are sent to the client in real-time in a single request.
Read more [devdojo.com]
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.
"Freek’s newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."
PHP is such a good language at this point.
Read more [dnlytras.com]
Andraes Möller blogged a few interesting strategies to name the constructors of your PHP objects.
Read more [localheinz.com]
While Amazon S3 is awesome for storage, It also has a feature called S3 Select. With S3 Select, You can use a simple SQL query to filter the content of the stored objects. and retrieve only a subset of data that you need.
Read more [sanjit.me]
I'm looking forward seeing with this group of developers will do for PHP.
Read more [opencollective.com]
The Laravel team released the next major version of Laravel Valet (3.0), which introduces running multiple versions of PHP in Valet applications side-by-side.
Read more [laravel-news.com]
I'm happy to announce that we have released Visit. This tool can display the response of any URL. Think of it as curl for humans. By default, the output will be colourized, and the response code and time will be displayed after the response.

JSON responses will be colourized by default as well.

And there's integration with Laravel: it can log in any user, report the numbers of queries used to build up the response, and more.

I'd like to tell you all about it in this blog post.
– sinnbeck.dev - submitted by René Sinnbeck
Are you getting errors with laravels groupBy()? Here is short explanation of why.
Read more [sinnbeck.dev]
Using else often encourages complexer code structure, makes code less readable. In most cases you can refactor it using early returns.
– geisi.dev - submitted by Tim Geisendörfer
Let's improve your users privacy with file encryption without using any 3rd party packages.
Read more [geisi.dev]
– tray2.se - submitted by Patrik Ahlström
I hope you won't run into any of these.
Read more [tray2.se]
Have you ever needed to maintain a project that wasn't yours? A project that, when you first opened it, gave you chills down your spine? Even without reading the code in detail, you could already tell it was a mess.
Getting started with testing is not that hard. Here's a free video taken from the Testing Laravel course that will show you how you can make sure you homepage works.
Read more [spatie.be]
– rias.be
One of our projects has a really large test suite that isn't optimised to run with Laravel's parallel testing. It was starting to take more than 15 minutes to have the whole test suite run inside Github Actions, which is when my colleague Rias searched for a better way to do this.
Read more [rias.be]
I'm proud to announce that Steve Bauman and our team at Spatie have released a new tool called spatie/globay-ray. When installed, you'll be able to use dd, dump and ray functions in any PHP file on your system.
I think this is great news.
Read more [symfony.com]
Laravel 9 is fresh out the door, and it contains a small contribution of mine: a new callOnce method for database seeders.
Read more [sebastiandedeyne.com]
In this stream on YouTube, Francisco Madeira, co-creator of Termwind, guides me through the source code of his amazing package to style content on the CLI
– devonmather.dev - submitted by Devon Mather
Let's explore the option of firing events on model scopes to add some glue between our feature tests and our unit tests.
Read more [devonmather.dev]