title: laravel - difference between foreignId() and unsignedBigInteger()
body: <p>New to Laravel</p>
  
  <p>What is the difference between foreignId() and unsignedBigInteger() while linking tables</p>
  
  <pre><code>$table-&gt;unsignedBigInteger('user_id');
  $table-&gt;foreignId('user_id');
  </code></pre>
  
  <p>I've tried both and they all worked.</p>
  
  <p>According to the <a href="https://laravel.com/docs/7.x/migrations#foreign-key-constraints" rel="noreferrer">documentation</a> it says:</p>
  
  <blockquote>
    <p>The <code>foreignId</code> method is an alias for <code>unsignedBigInteger</code> </p>
  </blockquote>
  
  <p>but what does <strong>alias</strong> mean? Does it mean they are the same?</p>
  
  <hr>
  
  <p>PS:
  I didn't use the code in the documentation but only </p>
  
  <pre><code>$table-&gt;unsignedBigInteger('user_id');
  </code></pre>
  
  <p>and/or</p>
  
  <pre><code>$table-&gt;foreignId('user_id');
  </code></pre>