New to Laravel
What is the difference between foreignId() and unsignedBigInteger() while linking tables
$table->unsignedBigInteger('user_id');
$table->foreignId('user_id');
I've tried both and they all worked.
According to the documentation it says:
The
foreignIdmethod is an alias forunsignedBigInteger
but what does alias mean? Does it mean they are the same?
PS: I didn't use the code in the documentation but only
$table->unsignedBigInteger('user_id');
and/or
$table->foreignId('user_id');