Oh, ok, this is probably our bad. We interpreted wrongly this paragraph in the doc:
If your model's primary key is not an integer, you should define a protected $keyType property on your model. This property should have a value of string:
Now, if I understand correctly, $keyType should hold the same value as in the $casts variable?
protected $casts = [
'id' => 'integer',
'created_at' => 'datetime',
'updated_at' => 'datetime',
'name' => 'string'
];
So when bigInteger is cast as "integer", the $keyType should be integer
too (but because it's not different than integer
, the $keyType will not be exported at all)?
Sorry for these questions, we've not experienced Laravel devs and any help from the community is welcomed.