Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how work cascade laravel

Schema::create('posts', function (Blueprint $table) {
    $table->increments('id');
    $table->integer('author')->unsigned();
    $table->timestamps();
    $table->foreign('author')->references('id')->on('users')->onUpdate('cascade');
});
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #work #cascade #laravel
ADD COMMENT
Topic
Name
1+6 =