title: Return result from eloquent's saveMany in addition to parent data
body: <p>After I save data into the database with <code>Eloquent</code>'s method <code>saveMany</code> - I want to return both <code>parent data</code> and <code>child data</code> in one <code>JSON</code> chunk. The problem is that in my current implementation, I can return either one or another, but not both. What would be the most appropriate and clean way to do it?</p>
  
  <p>I have 2 models:</p>
  
  <ul>
  <li><code>Theader</code> (i.e. Header)</li>
  <li><code>Line</code></li>
  </ul>
  
  <p>Relationship is one to many:</p>
  
  <pre><code>final class Theader extends Model 
  {
      public $timestamps = false;
      protected $fillable = array('total_amount', 'name', 'description');
  
      public function lines()
      {
          return $this-&gt;hasMany('App\Line', 'header_id');
      }
  }
  
  final class Line extends Model 
  {
      public $timestamps = false;
      protected $fillable = array('amount', 'description');
  
      public function theader()
      {
          return $this-&gt;belongsTo('App\Theader', 'header_id');
      }
  }
  </code></pre>
  
  <p>When I insert the new data::</p>
  
  <ul>
  <li>1 line goes to <code>theaders</code> table. Unique <code>id</code> is generated.</li>
  <li>2 to 100 lines are going to <code>lines</code> table. All have the same <code>header_id</code>.</li>
  </ul>
  
  <p>Here is the working solution that I have come up with:</p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use App\Theader;
  use App\Line;
  use App\Http\Controllers\Controller;
  use Illuminate\Http\Request;
  
  class TheaderController extends Controller
  {   
      public function create(Request $request){
          $input = $request-&gt;all();
          $input['name'] = 'My name';
          $input['description'] = 'My description';
          $input['lines'][] = [ 'name' =&gt; 'Test 1', 'amount' =&gt; 19 ];
          $input['lines'][] = [ 'name' =&gt; 'Test 2', 'amount' =&gt; 15 ];
  
          // first create Header
          $header = Theader::create($input);
  
          // now let's create lines
          $lines = [new Line($input['lines'][0]), new Line($input['lines'][1])];
          $header-&gt;lines()-&gt;saveMany($lines);
  
          return response()-&gt;json($header);
      }
  }
  </code></pre>
  
  <p>In this example - how do I return header + all newly inserted lines in one go?</p>
  
  <p>I can either use <code>return response()-&gt;json($header);</code> or <code>return response()-&gt;json($header)-&gt;lines;</code> but neither of these options return both <code>header</code> and <code>lines</code> at the same time.</p>