A clear walkthrough of how PHP closures implicitly capture $this, even when they don’t use it, and how that can prevent objects from being garbage collected. Also covers what PHP 8.6 will change with automatic static inference.
PHP
Eloquent Query Classes Pattern
Learn how to use Eloquent Query Classes to organize important database logic in Laravel without adding a full repository layer. Read more