Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel 7 eloquent on delete set null schema

$table->foreignId('user_id')
      ->constrained()
      ->onDelete('cascade');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #eloquent #delete #set #null #schema
ADD COMMENT
Topic
Name
2+7 =