1use Illuminate\Database\Schema\Blueprint;
2use Illuminate\Support\Facades\Schema;
3
4Schema::table('posts', function (Blueprint $table) {
5 $table->unsignedBigInteger('user_id');
6
7 $table->foreign('user_id')->references('id')->on('users');
8});