laravel on delete set null not working code example
Example: laravel on delete set null
$table->...->onDelete('set null');
#First make sure you set the foreign key field as nullable:
$table->integer('foreign_id')->unsigned()->nullable();
$table->...->onDelete('set null');
#First make sure you set the foreign key field as nullable:
$table->integer('foreign_id')->unsigned()->nullable();