Sometimes you may wish to extend the database Connection class in Laravel. Maybe you want to customize the internal workings. In my case I needed to alter the database results for every query, whether it’s through the Fluent Query Builder or Eloquent. I needed to do this to make my package, Laravel DB Normalizer, work as smoothly as possible.
Join the weekly newsletter and never miss out on new tips, tutorials, and more.
Use statements in code design
Rob Allen writing about use statements in code design. I came to the same conclusion as Rob and much prefer importing…
Laravel Application Environments without Hostnames
Steve Grunwell shares a tip of using Server Variables for hostname detection and utilizing /environment.php