I\'m not using the auto increment for the id instead i\'m using the 32 char unique id. So when i create a relationship and query, im getting a null because my FK expecting i
In newer versions of Laravel (Im using 6.5.1) you have to set up the key type to string (By default PK type is set to integer)
Following the example of the question:
class User extend Eloquent {
public $incrementing = false;
public $keyType = 'string';
}
class Reservation extend Eloquent {
public $incrementing = false;
public $keyType = 'string';
}
You can see the example in the laravel documentation