Answers for "laravel suppresion en cascade"

PHP
1

cascade laravel

Schema::create('posts', function (Blueprint $table) {
    $table->id();
    $table->foreignId('author')->constrained('users')->onDelete('cascade')->onUpdate('cascade');
    $table->timestamps();
});
Posted by: Guest on July-25-2021

Browse Popular Code Answers by Language