- Published on
Most of the time we select all fields in eager-loaded fields from eloquent eager-loaded fields which causes unnecessary memory consumption. Using a simple trick we can select only the necessary field from eager loaded table and reduce memory consumption.