Magento, Laravel, Eloquent.
->with('brand:id,name') ->paginate() ]); } This way, Laravel will make sure only to select the id and name columns when eager to load the relationship. Optimizing circular relationships Let’s say that our product model looks like this, class Product extends Model { public function category() {