Open amitsingh9thjan opened 2 years ago
any solution i'm having the same problem
You can try to map the array like below and see if it works for you.
->optionsResolve(function ($shows) {
return $shows->get(['title', 'en_title'])
->pluck('title', 'en_title')
->map(function($title, $key) {
return ['title' => $key, 'en_title' => $key . ' - ' . $en_title];
})
->values()
->toArray();
})
NovaBelongsToDepend::make('Shows', 'shows', \App\Nova\Shows::class) ->placeholder('-- Select Show --') // Add this just if you want to customize the placeholder ->options(Shows::all()) ->display(function($shows){ return $shows->title . ' - ' . $shows->en_title; }),
I'm trying this but it's not showing display attribute content.