Avoiding one-liners in PHP
Focus on writing code that solves real problems, is well-tested, and is easy to maintain.
Read more [localheinz.com]
Focus on writing code that solves real problems, is well-tested, and is easy to maintain.
Read more [localheinz.com]
A nice refactor from Aaron Francis
I'm always on the lookout for a good "make more things the same" refactor and I just found one!
— Aaron Francis (@aarondfrancis) March 8, 2023
Make your life easy, make more things the same. pic.twitter.com/tQfnqSZ84u
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."
Before you write any code — ask if you could ever possibly want multiple kinds of the thing you are coding. If yes, just do it. Now, not later.
Read more [www.swyx.io]
While attending Laracon India, many people approached me to ask how we handle the maintenance of all our Spatie packages. One of the ways we keep maintenance burden low is by making our packages customizable. In this blog post, I'd like to cover some of our best tips to make a Laravel package easy…
– jamie-peters.co.uk - submitted by Jamie Peters
Have you ever been using the Laravel Request class and found yourself creating single use variables just for type casting? What if I told you there's a better way...
Read more [jamie-peters.co.uk]
– stefrouschop.nl - submitted by Stef Rouschop
With a proper implementation of global scopes instead of local scopes, the code and security would be greatly improved. Let me illustrate this with a simple example.
Read more [stefrouschop.nl]
– www.eloquentarchitecture.com - submitted by John Freeman
The LoB principle dictates that the behavior of a unit of code should be as obvious as possible by looking only at that unit of code. But I think something is missing from this discussion.
Read more [www.eloquentarchitecture.com]
– medium.com - submitted by Mazen Touati
We will crack the controversy of the repository pattern in Laravel. The good and the bad, and what alternatives we can use to build a maintainable codebase.
Read more [medium.com]
– youtu.be - submitted by Bert De Swaef
Bert shows us a hidden Laravel gem!
Read more [youtu.be]
What I've come to realize, though, is that anyone can write code that seems complicated. The hard thing is solving complex problems with simple code.
Read more [www.joshwcomeau.com]
– davorminchorov.com - submitted by Davor Minchorov
These books will help you learn more about PHP in detail and make you a better software engineer overall.
Read more [davorminchorov.com]
– tighten.com - submitted by Jamison Valenta
This post discusses three equitable design considerations to avoid creating unintentional barriers and cultural or social biases for potential users.
Read more [tighten.com]
– tighten.com - submitted by Jamison Valenta
This post discusses accessibility design considerations that will help users with disabilities successfully use and navigate your website or application.
Read more [tighten.com]
– youtu.be - submitted by Andrew Schmelyun
What declarative programming is, and how to include more of it in your PHP code base.
Read more [youtu.be]
– fhur.me
A good tip by Fernando Hurtado
Read more [fhur.me]
This post is about Rails, but applies to Laravel as well
Read more [dev.37signals.com]
– tray2.se - submitted by Patrik Ahlström
Tracking changes in a table or several tables for that matter can be essential for your application, and we are going to take a look on how to do that using only the MySQL/MariaDB database.
Read more [tray2.se]
Here's how you can make sure that all implementations of an interface behave correctly
Read more [www.kai-sassnowski.com]
– planetscale.com - submitted by Aaron Francis
A comprehensive overview of Laravel's many safety features that can help you prevent painful mistakes.
Read more [planetscale.com]
– tray2.se - submitted by Patrik Ahlström
What is a database view, and how can we use it to make our code cleaner?
Read more [tray2.se]