Hey @stevenmw I've updated the formatting in your post and you have an error in your last migration (the one for the invoices_products
table).
You are using Schema::table
instead of Schema::create
and that is causing the Exception.
Change it to this and it should work:
public function up()
{
Schema::create('invoices_products', function (Blueprint $table) {
$table->id();
$table->foreignId('invoice_id')->constrained('invoices');
$table->foreignId('product_id')->constrained('products');
$table->string('subject')->nullable();
$table->bigInteger('price')->nullable();
$table->bigInteger('quantity')->nullable();
});
}
stevenmw liked this reply
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community