set null on foreign key deletion in laravel

105

set null on foreign key deletion in laravel -

$table->foreignId('forign_id')->nullable()->constrained("table_name")->cascadeOnUpdate()->nullOnDelete();

Comments

Submit
0 Comments