id(); $table->foreignId('product_id')->constrained('products')->onDelete('cascade'); $table->foreignId('dealer_id')->constrained('dealers')->onDelete('cascade'); $table->decimal('quantity', 10, 2)->default(0); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('stocks'); } }