1 public function up()
2 {
3 Schema::table('user_projects', function (Blueprint $table) {
4 $table->unique(["user_id", "project_id"], 'user_project_unique');
5 });
6 }
7
8 public function down()
9 {
10 Schema::table('user_projects', function (Blueprint $table) {
11 $table->dropUnique('user_project_unique');
12 });
13 }
14