bigIncrements('id'); $table->string('module')->comment('模块'); $table->string('action')->comment('操作'); $table->string('target_type')->comment('目标类型'); $table->bigInteger('target_id')->comment('目标id'); $table->string('target_field')->comment('目标字段'); $table->text('before_update')->comment('更新前数据'); $table->text('after_update')->comment('更新后数据'); $table->bigInteger('user_id')->comment('操作人id'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('logs'); } }