Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel 8 foreign key

Schema::table('posts', function (Blueprint $table) {
    $table->foreignId('user_id')->constrained();
});
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #foreign #key
ADD COMMENT
Topic
Name
1+6 =