Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

cascade in laravel migration

$table->dropForeign('answers_user_id_foreign');
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #cascade #laravel #migration
ADD COMMENT
Topic
Name
8+9 =