Laravel Schema onDelete set null
If you want to set null on delete:
$table->...->onDelete('set null');
First make sure you set the foreign key field as nullable:
$table->integer('foreign_id')->unsigned()->nullable();
In laravel 8 you can use:
$table->foreignId('forign_id')->nullable()->constrained("table_name")->cascadeOnUpdate()->nullOnDelete();
The different options are declared in class Illuminate\Database\Schema\ForeignKeyDefinition
(see source).