Tampilan Laravel tidak dibuat menggunakan kunci asing
Schema::create('larachat_chat_rooms', function (Blueprint $table) {
$table->increments('id');
//Foreign key must be unsignedBigInteger
$table->unsignedBigInteger('creator_id');
$table->softDeletes();
$table->timestamps();
//Define foreign key id here
$table->foreign('creator_id')->references('id')->on('users')->onDelete('cascade');
});
Lazurite