title: Laravel 5.4 storing mass assignment model and relationship
body: <p>I'm unsure of the best practice when inserting mass assignment relationships within Laravel 5.4 - I'm new to the framework. The below code is working correctly, however can you tell me is there a way to simply into one line (inserting relationships)?</p>
  
  <p>I've tried to look at 'save()'and 'push()' but it's not working as expected. Would this have an impact if transactions would scale up?</p>
  
  <p>I have a Listing model, with a hasOne relationship:</p>
  
  <pre><code>    public function garage()
      {
         return $this-&gt;hasOne('App\Garage', 'post_id');
      }
  </code></pre>
  
  <p>First of all I have some validation, then I use the following to store, which I want to simplify to one one line of code:</p>
  
  <pre><code>public function store(Request $request)
  {
      // Validation has passed, insert data into database
     $listing = Listing::create($request-&gt;all());
     $listing-&gt;Garage()-&gt;create($request-&gt;all());
  }
  </code></pre>
  
  <p>Also if I wanted to return the data inserted, how would I do this as the following is only returning the Listing model and not the Garage relationship? Yes I know that I wouldn't do this in a real world application.</p>
  
  <pre><code>return \Response::json([
  'message' =&gt; 'Post Created Succesfully',
  'data' =&gt; $listing
  ]);
  </code></pre>
  
  <p>Any help is muchly appreciated</p>