Improve code readability by refactoring if blocks to dedicated classes original
by Freek Van der Herten – 1 minute read – Edit
by Freek Van der Herten – 1 minute read – Edit
by Freek Van der Herten – 1 minute read – Edit
Most developers have probably seen some complex conditionals in legacy code. In this video I show you how to refactor those.
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."
– github.com - submitted by Aaron Francis – Edit
Sidecar packages, creates, deploys, and executes Lambda functions from your Laravel application.
Read more [github.com]
– frontstuff.io – Edit
An excellent post on the subject by Sarah Dayan.
Read more [frontstuff.io]
– tighten.co - submitted by Jamison Valenta – Edit
Tighten employees share encouragement for anyone struggling through the pandemic.
Read more [tighten.co]
by Freek Van der Herten – 1 minute read – Edit
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.
– doeken.org – Edit
Thanks to Doeke Norg personal access tokens became more flexible in Sanctum. In this blog post, he explains how you might use the new functionality
Read more [doeken.org]
by Freek Van der Herten – 2 minute read – Edit
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.
– www.laravel-enlightn.com - submitted by Paras Malhotra – Edit
An in-depth guide on offset and cursor pagination in Laravel, and the pros and cons of each.
Read more [www.laravel-enlightn.com]
Jordi is back with another post containing interesting statistics around PHP usage.
Read more [blog.packagist.com]
– www.tonysm.com - submitted by Tony Messias – Edit
Tony Messias explains this design pattern using a cool example.
Read more [www.tonysm.com]
by Freek Van der Herten – 1 minute read – Edit
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.
by Freek Van der Herten – 2 minute read – Edit
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.
by Freek Van der Herten – 3 minute read – Edit
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.
PHP is a fantastic language that has seen many cool improvements over the past few years. What you may not be aware of is that only a very few people can work on the language itself. This is obviously not healthy and hopefully this situation will improve in the future.
Read more [blog.krakjoe.ninja]
by Freek Van der Herten – 1 minute read – Edit
by Freek Van der Herten – 1 minute read – Edit
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.
by Freek Van der Herten – 1 minute read – Edit
Our team released a new package called spatie/fork. Using this package you can easily execute multiple pieces of code concurrently.
Some best practices and tips for composing high quality pull requests when contributing to open source projects.
Read more [dev.to]
Let's dive into some of the design considerations you might make when designing abstractions that reach over a network.
Read more [blog.frankdejonge.nl]