laravel 7 数据库迁移 和填充到 软删除
一.数据库迁移
1.在生成模型的时候生成 数据库迁移 命令
php artisan make:model Models/User -m
2.迁移结构
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('username',50)->comment('账号');
//default('未知') 默认值
$table->string('truename',50)->default('未知')->comment('真是姓名')