Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: display custom user attribute instead of only name #24

Closed
elia-c opened this issue Oct 19, 2023 · 2 comments
Closed

Feature request: display custom user attribute instead of only name #24

elia-c opened this issue Oct 19, 2023 · 2 comments
Labels
feature Suggest new feature

Comments

@elia-c
Copy link

elia-c commented Oct 19, 2023

Add a config option like user\display_attribute = 'display_name'
to use to display instead of only the user name.

With this feature will be possible to do something like append model attribute and use it. Example

class User extends Authenticatable
{
 /**
     * The accessors to append to the model's array form.
     *
     * @var array
     */
    protected $appends = ['displaylabel'];

    /**
     * Attributo composto
     * @return string
     */
    public function getDisplaylabelAttribute()
    {
        return $this->name . ' ' . $this->surname;
    }

}
@milwad-dev milwad-dev added the feature Suggest new feature label Oct 19, 2023
@milwad-dev
Copy link
Member

Hello, This feature will be added soon.
Thanks for making an issue

@milwad-dev
Copy link
Member

#44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Suggest new feature
Projects
None yet
Development

No branches or pull requests

2 participants