Why we need named arguments in PHP
– stitcher.io – Edit
Brent wants you to vote yes. Here's why from the point of view of a userland developer, both for client projects and open source.
Read more [stitcher.io]
– stitcher.io – Edit
Brent wants you to vote yes. Here's why from the point of view of a userland developer, both for client projects and open source.
Read more [stitcher.io]
by Freek Van der Herten – 4 minute read – Edit
I'm proud to announce our team is creating a new video course called Laravel Beyond CRUD. In this course, you'll learn various patterns to build a large scale Laravel app with your team. Even if you're not working on large Laravel apps, there are lots of things to learn to improve your projects.
This course will be offered as a premium video course, and as a book. The course will be presented by Brent, who is in the lead at various large scale client projects at Spatie. The book, also written by Brent, is beautifully designed by my colleague Seb.
At the Laravel Beyond CRUD website, you can subscribe to our email list. We'll notify you as soon as the course is available in September. We'll also mail you an extra preview.
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.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
– madewithlove.com – Edit
Emma Febre wrote an interesting piece on the pittfals of using snapshots.
Read more [madewithlove.com]
– stitcher.io – Edit
My colleague Brent shares a story to illustrate why you shouldn't write your own framework.
Read more [stitcher.io]
– timacdonald.me – Edit
It can be very hard to spot a false positive within a test. So how do you avoid them?
Read more [timacdonald.me]
The usage of phantom types is a simple type level trick which can help with this in practical settings, without requiring complicated features or making your code too abstract and less readable.
Read more [marcosh.github.io]
by Freek Van der Herten – 1 minute read – Edit
Readability of code can be vastly improved by decreasing indentation. In this video we'll reverse conditions and early returns to accomplish this. If you want to see more videos like this one, head over to the video section at Spatie.
– frederickvanbrabant.com - submitted by Frederick Vanbrabant – Edit
My buddy Frederick wrote an interesting post on why he always checks out the admin panel of an app instead of the code.
Read more [frederickvanbrabant.com]
Dave Marshall replies to a blogpost that Frank De Jonge published recently.
Read more [davedevelopment.co.uk]
– laravel-news.com – Edit
Tim MacDonald shares a nice way to go about this.
Read more [laravel-news.com]
Geepaw Hill explains a way to avoid demeter violations.
Read more [www.geepawhill.org]
– Edit
🔥 Applications often have the most lines of code within controller actions.
— Jason McCreary (@gonedark) April 13, 2020
One practice to streamline your code is directly assigning view variables.
This also limits the use of temporarily variables and promotes abstractions which make the code more readable. pic.twitter.com/m0JGsybQ9k
– driesvints.com - submitted by Dries Vints – Edit
Dries Vints wrote a bost on why he uses single action controllers.
Read more [driesvints.com]
A must read by Frank de Jonghe on testing.
Read more [blog.frankdejonge.nl]
– tighten.co - submitted by Matt Stauffer – Edit
The average Laravel app sends between a few and a few dozen notifications to users, but what happens when they want to opt out? With legal regulations like GDPR, it's more important than ever to give users control over the emails they receive.
Read more [tighten.co]
My colleague Seb explains why and how you should use a global .gitignore file
Read more [sebastiandedeyne.com]
Seb explains why it's perfectly safe to drop a major version of PHP without tagging a new major version of a package.
Read more [sebastiandedeyne.com]
by Freek Van der Herten – 2 minute read – Edit
In this short post, I'd like to give you a tip on writing readable PHP.
by Freek Van der Herten – 1 minute read – Edit
In this video, which is part of the mailcoach video course, I show how I like to write my exceptions.
At the time of writing this post, we're running a contest where you can win a free mailcoach license.
by Freek Van der Herten – 1 minute read – Edit
Have you every come across confusing if statements with complex conditionals such as this? I bet you did!
// please kill me 🤯 if (!(($this->shipping_country == "GB" || (strcmp($this-status, "Valid") !== 0)) {
To me, this is completely unreadable.
In the video below I show how I deal with this situation. Spoiler: add some tests around it and break the conditionals apart.
This video is part of the Mailcoach video course. It contains many more videos on how to write clear code. You can use this coupon code to get a nice discount of $10.
YES-I-WANT-TO-WRITE-READABLE-CODE