📜  laravel 8 外键 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:29.540000             🧑  作者: Mango

代码示例6
Schema::table('posts', function (Blueprint $table) {
    $table->foreignId('user_id')->constrained();
});