title: How do i change a column's reference table in laravel 7
body: <p>I made a mistake when i was building database, so as you will see in codes, my &quot;order_id&quot; column in &quot;baskets&quot; table is referenced from &quot;customers&quot; table but it should have been from &quot;orders&quot; table,</p>
  <pre><code>public function up()
      {
          Schema::create('baskets', function (Blueprint $table) {
              $table-&gt;id();
              $table-&gt;unsignedBigInteger('firm_id');
              $table-&gt;foreign('firm_id')
                      -&gt;references('id')-&gt;on('firms')
                      -&gt;onDelete('cascade');
              $table-&gt;unsignedBigInteger('customer_id');
              $table-&gt;foreign('customer_id')
                      -&gt;references('id')-&gt;on('customers')
                      -&gt;onDelete('cascade');
              $table-&gt;unsignedBigInteger('order_id');
              $table-&gt;foreign('order_id')
                      -&gt;references('id')-&gt;on('customers')
                      -&gt;onDelete('cascade');
              $table-&gt;unsignedBigInteger('service_id');
              $table-&gt;foreign('service_id')
                      -&gt;references('id')-&gt;on('services')
                      -&gt;onDelete('cascade');
              $table-&gt;decimal('price', 11, 2);
              $table-&gt;integer('quantity')-&gt;default(1);
              $table-&gt;string('note')-&gt;nullable();
              $table-&gt;timestamps();
          });
      }
  </code></pre>
  <p>So how can i change its reference table from &quot;customers&quot; to &quot;orders&quot; table.</p>
  <p>Thank you all in advance.</p>