Answers for "add foreign key from another table laravel migration"

PHP
0

Laravel create foreign key column in migration

$table->foreignId('post_id')
                ->constrained()
                ->onUpdate('cascade')
                ->onDelete('cascade');
Posted by: Guest on July-18-2021

Code answers related to "add foreign key from another table laravel migration"

Browse Popular Code Answers by Language