No, Utility Classes Aren't the Same As Inline Styles
Sarah Dayan throughouhly explains the differences between utility classes and inline styles
Read more [frontstuff.io]
Posts tagged with best practices
Sarah Dayan throughouhly explains the differences between utility classes and inline styles
Read more [frontstuff.io]
We talk about cleverness as if it’s Just Bad, such as “clever code is harder to debug”. That’s going too far. Cleverness can lead to faster, safer, even clearer code.
Read more [www.hillelwayne.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.
"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."
My colleague Brent shares some thoughts on possible improvements to handling config values.
Read more [stitcher.io]
Matthias Noback wrote down some good testing advice.
Read more [matthiasnoback.nl]
Regular expressions are powerful, PHP but they are not known to be readable, and more often than not, maintaining a regular expression is not a straight-forward task. Here are some tips to improve and write better regular expressions in PHP.
Read more [php.watch]
Mohamed shows how you can deal with N+1 problems using the $with model attribute and the newly added Model::preventLazyLoading() method.
Benjamin Eberlei tells the story of a performance mistake that is quickly made even by experienced developers.
Read more [tideways.com]
Most developers have probably seen some complex conditionals in legacy code. In this video I show you how to refactor those.
An excellent post on the subject by Sarah Dayan.
Read more [frontstuff.io]
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.
– dev.to - submitted by Patrick
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]
I do want to point out that print debugging has one critical feature that most step-based debuggers don't have: you can see program state from multiple time steps all at once.
Read more [buttondown.email]
YouTube star Povilas Korop shares and discusses five rules from our guidelines.
– php.watch - submitted by Ayesh
Security precautions Composer already has, and what you can do to improve them further.
Read more [php.watch]
In this post, Dan Abramov shares two different techniques to optimize components without having to reach for memo().
Read more [overreacted.io]
This is how Seb decides when or when not to explicitly add types in TypeScript.
Read more [sebastiandedeyne.com]