outl1ne / nova-notes-field

This Laravel Nova package adds a notes field to Nova's arsenal of fields.
MIT License
51 stars 36 forks source link

No name appears as user posts #23

Closed LorenzoSapora closed 3 years ago

LorenzoSapora commented 3 years ago

Is it looking for the column users.name? I don't have that column, but even with an

    public function getNameAttribute()
    {
        return "{$this->first_name} {$this->last_name}";
    }

it doesn't seem to make a difference. I'm definitely missing something here, but can't put my finger on what.

image

Tarpsvo commented 3 years ago

Hey @LorenzoSapora!

I improved the name logic a bit, it should work for you now, even without the getNameAttribute() in version 1.5.8.

You were very close to a workaround - only thing missing was a protected $appends = ['name'];. Now it should work out of the box though.

Thanks for reporting this!