The magic of dedicated exception classes
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.
Posts tagged with best practices
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.
Join thousands of developers
Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.
No spam. Unsubscribe anytime. You can also follow me on X.
– 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]
In almost every Laravel package, there is a ServiceProvider class responsible for registering bindings package resources such as config files, views, migrations, ...
While preparing a workshop that I gave on package development, I watched some videos of our own Laravel package training video course again. While watching the videos on using the service provider again, I had the idea to simplify how resources can be registered.
Meanwhile, I've fleshed out the idea and release it as a new package called laravel-package-tools. In this blog post, I'd like to introduce the package to you.
My colleague Brent makes the case for targetting and uses the latest PHP version.
Read more [stitcher.io]
"When it feels safe to make changes to code, it’s not really legacy code any longer".
Read more [medium.com]
– protone.media - submitted by Pascal Baljet
Introducing a new Laravel package that allows you to re-use scopes as a boolean attribute on Eloquent models.
Read more [protone.media]
– www.csrhymes.com - submitted by Chris Rhymes
Splitting up a large Laravel Livewire component into more manageable and maintainable chunks
Read more [www.csrhymes.com]
Here's an excerpt taken from Front Line PHP where different strategies to handle null are explained
Read more [front-line-php.com]
Technical debt is not simply a measure of the specific work needed to repay the debt; it is the additional time and effort added to all past, present, and future work that comes from having the debt in the first place.
Read more [www.oreilly.com]
Here's an entire chapter taken from Front Line PHP, a course on building moderns apps with PHP 8
Read more [front-line-php.com]
We have released a new package, called spatie/laravel-settings, that allows you to strongly type settings in a Laravel app. In this blog post, I'd like to introduce the package to you.
– naxon.dev - submitted by Daniel Naxon
Ever needed to apply filters on a query conditionally, only when the user actually applies them? Laravel query builder's method when got you covered.
Read more [naxon.dev]