Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

cascade laravel

Schema::create('posts', function (Blueprint $table) {
    $table->id();
    $table->foreignId('author')->constrained('users')->onDelete('cascade')->onUpdate('cascade');
    $table->timestamps();
});
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #cascade #laravel
ADD COMMENT
Topic
Name
7+8 =