UUID Foregin Constraint

PHOTO EMBED

Sat Feb 20 2021 15:37:25 GMT+0000 (Coordinated Universal Time)

Saved by @nhatphan108

// UUID 
$table->uuid('file_id');
 $table->foreign('file_id')->references('id')->on('files');

// MANUAL ID
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');

//
$table->foreignId('user_id')->constrained();
content_copyCOPY