Skip to content

[Feature Request]: auto-suggestion in data_get #1338

@decadence

Description

@decadence

Feature Description

It would be convenient to have auto-suggestion in data_get for Models.

For example (User Model)

/**
 * Get Telegram chat ID for User
 */
public function getChatId(): string|null
{
    // works
    // return $this->chat->chat_id;

    // doesn't work
    return data_get($this, "chat.chat_id");
}

/**
 * Telegram chat for user
 */
public function chat(): HasOne
{
    return $this->hasOne(Chat::class, "user_id");
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions