Eager Loading with Specific Columns

  • Laravel
  • Eloquent
1<?php
2 
3$users = Post::with('author:id,name')->get();