id(); $table->foreignId('user_id')->constrained(); $table->foreignId('customer_id')->constrained(); $table->foreignId('address_id')->constrained(); $table->foreign('delivery_id')->references('id')->on('addresses'); $table->string('invoice_number'); $table->string('type'); // Map to external formats $table->string('status'); // Open, payed ... $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('invoices'); } };