id(); $table->string('name'); $table->string('address')->nullable(); $table->string('city')->nullable(); $table->string('state')->nullable(); $table->integer('zip')->nullable(); $table->timestamps(); }); Schema::table('users', function(Blueprint $table) { $table->foreignIdFor(School::class)->nullable()->after('id')->constrained()->onUpdate('cascade')->onDelete('set null'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('schools'); } };