Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how set cascade on delete and update in same time in laravel


$table->foreign('user_id')->references('id')->on('users')
->onDelete('SET NULL')
->onUpdate('SET NULL'); // also available CASCADE, RESTRICT, DO NOTHING, NO ACTION

Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #cascade #delete #update #time #laravel
ADD COMMENT
Topic
Name
4+1 =