Closed letuss004 closed 2 years ago
ide-helper reads the information directly from the database: are you sure in the environment you're running the helper that the database has the correct column type?
AFAIK there's no special handling for id
or primary keys, they're discovered like any other column 🤷♀️
Me also the same, +1
I also managed to reproduce this problem. Generally there is no problem, it's expected behavior for Laravel. The Model
abstract class defined primary key type as int
:
/**
* The "type" of the primary key ID.
*
* @var string
*/
protected $keyType = 'int';
Source: https://github.com/illuminate/database/blob/master/Eloquent/Model.php#L63
As it's written in Laravel documentation, if you use other type for id
you should redefine $keyType
property on your model, like this:
protected $keyType = 'string';
Source: https://laravel.com/docs/8.x/eloquent#primary-keys
I think this issue can be closed.
I think this issue can be closed.
Following the suggestion as OP hasn't come back in a month
Versions:
Description:
My "users" table has string('id') as primary key but ide-helper always generate id types of int.
Steps To Reproduce: