Answers for "on dlete remove foreign key to null laravel"

PHP
3

laravel remove foreign key

$table->dropForeign('posts_user_id_foreign');
Posted by: Guest on April-22-2020
0

set null on foreign key deletion in laravel

$table->foreignId('forign_id')->nullable()->constrained("table_name")->cascadeOnUpdate()->nullOnDelete();
Posted by: Guest on March-21-2021

Code answers related to "on dlete remove foreign key to null laravel"

Browse Popular Code Answers by Language