title: Reciproc relationship migration order in Laravel
body: <p>I am trying to create a relationship in Laravel Migration:</p>
  
  <pre><code>User &gt; has many &gt; Images
  User &gt; has one &gt; Image (image_id) &lt;-- Avatar
  
  Image &gt; belongsTo &gt; User (user_id)
  </code></pre>
  
  <p>If I will create the migration with <code>references</code> to mark the relationships, the migration will fail because image needs User, and User needs image.</p>
  
  <p>How should I order migrations to prevent this from happening?</p>
  
  <p>(<a href="https://laravel.com/docs/5.4/migrations" rel="nofollow noreferrer">https://laravel.com/docs/5.4/migrations</a>)</p>