laravel 8 how to set foreign key ondelete do nothing code example
Example: set null on foreign key deletion in laravel
$table->foreignId('forign_id')->nullable()->constrained("table_name")->cascadeOnUpdate()->nullOnDelete();
$table->foreignId('forign_id')->nullable()->constrained("table_name")->cascadeOnUpdate()->nullOnDelete();