Answers for "laravel en cascad ou set null"

PHP
3

laravel migration on delete set null

$table->...->onDelete('set null');
Posted by: Guest on April-22-2020
0

laravel 7 eloquent on delete set null schema

$table->foreignId('user_id')
      ->constrained()
      ->onDelete('cascade');
Posted by: Guest on November-30-2020

Browse Popular Code Answers by Language