id(); $table->string('name'); $table->string('phone'); $table->timestamps(); $table->softDeletes(); }); Schema::table('areas', function (Blueprint $table) { $table->foreignId('responsible_id') ->nullable() ->after('district_id') ->constrained('responsibles') ->nullOnDelete(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::table('areas', function (Blueprint $table) { $table->dropForeign('areas_responsible_id_foreign'); $table->dropColumn('responsible_id'); }); Schema::dropIfExists('responsibles'); } };