Skip to content

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

@elia-c

Description

@elia-c

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;
    }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureSuggest new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions