string('nik')->nullable()->after('email'); $table->foreignIdFor(Branch::class)->nullable()->after('nik')->constrained('branches'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('users', function (Blueprint $table) { $table->dropColumn('nik'); $table->dropForeign(['branch_id']); $table->dropColumn('branch_id'); }); } };