laravel 模型迁移文件常规字段设计

laravel  模型迁移文件常规字段设计

# 迁移文件代码
Schema::create('表名', function (Blueprint $table) {
    // 主键
    $table->bigIncrements('id');
    $table->unsignedInteger('pid')->default(0)->comment('上级ID');
    $table->string('field_name',50)->default('')->comment('字段名');
    $table->string('name',50)->default('')->comment('属性名称');
    $table->string('icon',200)->default('')->comment('图标');
    $table->timestamps();
    // 软删除
    $table->softDeletes();
});
原文地址:https://www.cnblogs.com/zqblog1314/p/13344099.html