I'm migrating an app from straight PHP to using Laravel. The current users table is called Person
with the primary key person_id
which is of unsigned bigint(20)
type.
I've updated my App\User model with the following:
protected $table = 'Person';
protected $primaryKey = 'person_id';
Whenever I make a request and inspect Auth->user()
, the person_id
is always the wrong value. My expected id is 4294967410
but it's returning 2147483647
. All other attributes on the user are correct (email, name, etc...).
I'm very stuck as to why this is the case. I'm using a fresh install of laravel.