How to get query builder to output its raw SQL query as a string in Laravel?
– postsrc.com - submitted by Sir Src – Edit
– postsrc.com - submitted by Sir Src – Edit
– timacdonald.me - submitted by Tim Mac – Edit
Introduce lazy loading to an existing application without interrupting flow or overwhelming your logs
Read more [timacdonald.me]
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.
"If you are one of the *millions* who have downloaded a Spatie package, then you understand the quality that Freek aims for. The newsletter is of the same quality of any Spatie package you're using."
– doeken.org - submitted by Doeke Norg – Edit
Cloning is a nice way of creating a quick copy of an object. But there are some things you need to be aware of!
Read more [doeken.org]
– ryangjchandler.co.uk - submitted by Ryan Chandler – Edit
Let's take a look at how we can create a custom Option type to handle optional values in PHP.
Read more [ryangjchandler.co.uk]
Using this package, you can quickly scan source code for calls to Ray
Read more [dev.to]
– jasonmccreary.me – Edit
Jason McCreary explains why and how he created his cool Pest converter
Read more [jasonmccreary.me]
by Freek Van der Herten – 13 minute read – Edit
Oh Dear is all-in-one solution to monitor your site that my buddy Mattias Geniar and I have created. It can monitoring uptime, certificates, broken links, scheduled jobs, and much more.
Under the hood, Oh Dear is a large Laravel application that performs many queries all of the time. To power future features, we've recently changed our database structure and refactored some pieces in our code base. We increased performance by decreasing the number of queries.
In this blog post, we'd like to to share some techniques that might be helpfull to increase the performance of your Laravel app too.
– flareapp.io – Edit
We've launched a new feature that will make it easier for users of your app to report specific errors.
Read more [flareapp.io]
Data providers are a PHPUnit feature (and many testing frameworks have an equivalent) that lets you run a single test method multiple times but with different data. Larry Garflied shows some cool things you can do with them.
Read more [peakd.com]
by Freek Van der Herten – 1 minute read – Edit
In this stream, Luke Downing shows us around in the source code of Pest parallel plugin he created.
– phpstan.org – Edit
Generics are available since PHPStan 0.12. This posts explain what they’re all about.
Read more [phpstan.org]
Laravel allows you to cast model attributes as encrypted strings1, when stored in the database. This gives you added security for any values that are sensitive (such as Personally identifiable information, PII), including complex structures such as arrays, collections, and even objects.
Read more [larasec.substack.com]
– nunomaduro.com – Edit
Good instructions provided by Nuno.
Read more [nunomaduro.com]
by Freek Van der Herten – 1 minute read – Edit
We've created a new package that can render a beautiful support form widget on any page. You can read more about the package in this blog post at Flare.
In this stream, I'll show you how to use the package. We'll also source dive its code.
Matthias Noback shares some considerations on when you could rely on PSR abstractions
Read more [matthiasnoback.nl]
– doeken.org - submitted by Doeke Norg – Edit
Context from traits is copy-pasted to your class and NOT inherited. What does that imply?
Read more [doeken.org]
by Freek Van der Herten – 1 minute read – Edit
In this stream, Brent and I showcase some cool techniques we use in our test suites.
– flareapp.io – Edit
A static analyzer helps you to find bugs in your code without even running it. Popular static analyzers for PHP are Psalm and PHPStan. In this post, we're going to look at what such a static analyzer can find in a two-year-old codebase.
Read more [flareapp.io]
Native PHP functionality and having a good design in the first place provide everything you need to avoid a mocking library.
Read more [peakd.com]
– ryangjchandler.co.uk - submitted by Ryan Chandler – Edit
Seeders are a great way of creating fixture data, as well as dummy data, for your development environment. Let me show you how we can make them even better.
Read more [ryangjchandler.co.uk]