Refactoring #3: Optimizing Eloquent queries & console commands

Optimizing Eloquent queries & console commands

Refactor into smaller methods

Use cursor() instead of get()

Use batches instead of individual inserts

Bonus small improvements

--

--

--

Full-stack web developer with a passion for software architecture and cloud computing.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Compare prices

Asynchronous scheduling in javascript

Live to Lear302

H2OFinance Referral Program

Connect Phone to Car Stereo Without Aux — Speakers Mag

HowTo: Create web-scraper with AWS Lambda

How the Visitor Pattern Works

Endless Battlefield Development Log -May 22th,2022

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Geni Jaho

Geni Jaho

Full-stack web developer with a passion for software architecture and cloud computing.

More from Medium

Improve quality of PHP applications with static analysis and SonarQube

PHP — RESTful API resource handler

Rest resource handler layered implementation

Laravel model presenters with the Reflection API

Reflection

Calculate PHP cache time with ease