Skip to content

[Bug]: Model, autocomplete does not work when _model_helpers.php has casting information #494

@dac514

Description

@dac514

Extension Version

1.2.1

PHP Binary

Sail

Operating System

Linux

What happened?

When code in vendor/_laravel_ide/_model_helpers.php looks like:

/**
* @property decimal:2|null $commission
* @mixin \Illuminate\Database\Query\Builder
*/
class Foo extends \Illuminate\Database\Eloquent\Model

Inferered from an Eloquent model that uses syntax like:

protected function casts(): array
{
  return [
    'commission' => 'decimal:2',
  ];
}

Autocomplete does not work. It cannot find $foo->commission

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions