id(); $table->string('key')->unique(); $table->string('name')->comment('名字'); $table->string('value')->nullable(); $table->string('type_key')->nullable(); $table->unsignedInteger('sort')->default(0)->comment('排序'); $table->unsignedBigInteger('parent_id')->default(0)->comment('上级ID'); $table->unsignedInteger('level')->default(1)->comment('层级'); }); } } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('keywords'); } };