id(); $table->enum('type', ["FOOD", "NUTRIENT"])->comment('类型,食物和营养素'); $table->string('name')->comment('名称'); $table->string('icon')->comment("图标"); $table->string('unit')->nullable()->comment("单位"); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('food'); } };