engine = 'InnoDB'; $table->increments('id'); $table->integer('number')->default(1)->comment('商品的数量'); $table->unsignedInteger('product_id'); $table->unsignedInteger('user_id'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('cars'); } }