2020-03-19
2020-03-19 本文已影响0人
迷途小书虫88
php artisan make:migration 表名
php artisan make migrate 创建
Schema::create('posts',function (Blueprint $table) {
$table->increments('id');
$table->string('title',100)->default("");
$table->text("content");
$table->integer("userid");
$table->timestamps();
});
php artisan migrate 执行 schema