Closed noahlocke closed 6 years ago
Thanks for this issus. Im looking into this.
@orlyapps Any ETA on this issue?
I'm also affected - I thought I had a fix for this but was wrong. :(
Hello,
this is in my opinion not a bug. You can archive a custom title this way:
class ExampleModel extends Model
{
protected $appends = ['title'];
public function getTitleAttribute()
{
return $this->attributes['name'] . ' custom';
}
}
class ExampleModel extends Resource
{
public static $model = 'App\ExampleModel';
public static $title = 'title';
}
I have updated the demo project
https://github.com/orlyapps/laravel-nova-demo
@orlyapps thanks!
The multi-select field is expecting a titleKey attribute for the custom label, but if the Nova Resource title is set with the title() method, then all you get is the Id in custom label.