art make:migration add _user_id_collum_to_Projects_table --table=projects
public function up() { Schema::table(‘projects‘, function (Blueprint $table) { // $table->integer(‘user_id‘); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::table(‘projects‘, function (Blueprint $table) { // $table->dropColumn(‘user_id‘); }); }
原文地址:https://www.cnblogs.com/hakeer/p/11523489.html
时间: 2024-10-02 06:44:22