Skip to content

[Bug]: Some model attributes are not "found" #1334

@smares

Description

@smares

Bug description

First of all, my current codebase has no migrations, but one MySQL schema file.

I have a handful of models that trigger issues in PhpStorm with the error Property accessed via magic method and the generated helper class does not contain said properties.

For example, the MySQL schema defines it at

`access_token_expires_at` timestamp NULL DEFAULT NULL

the model's casts method has 'access_token_expires_at' => 'datetime', the model's $fillable property lists, yet the property is not "found" by Laravel Idea (the helper class does not have access_token_expires_at as property at all).

In a another model, I have this similar issue with my paid_at property.

Finally, in another model, I have a relation defined as

public function ownedSources(): BelongsToMany
{
    return $this->belongsToMany(Source::class)
        ->withPivot('custom_name')
        ->withTimestamps();
}

and the helper even has

* @property _IH_Source_C|Source[] $ownedSources
* @property-read int $owned_sources_count
* @method BelongsToMany|_IH_Source_QB ownedSources()

yet when I tell PhpStorm to analyze my source code, it tells me again Property accessed via magic method.

Any idea?

Plugin version

12.3.0.253

Operating system

macOS Tahoe 26.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions