Closed Alrektii closed 5 years ago
Edit: When a random value is selected and you press save to database , the selected value is saved to the database
I have the same problem with my accessors. In my case i have a model called Employee
and in my table two columns first_name
and last_name
. I have defined in my model an Accessor getFullNameAttribute
that is used in my nova resource in public static $title = 'full_name';
Hello,
you need to pass an array to the options method like this:
NovaBelongsToDepend::make('Country')->options([['id' => 1, 'name' => 'test'], ['id' => 2, 'name' => 'test2']]),
Or use the tipp from @stezani 👍
@orlyapps I am facing the same exact issue even though my options are formatted the same way you have it.. is there any other reason to that? Also the values are correct and are being added to the database. I just can't view them
@orlyapps I am facing the same exact issue even though my options are formatted the same way you have it.. is there any other reason to that? Also the values are correct and are being added to the database. I just can't view them
If you update resource title to 'name' you can solve the problem. It should be public static $title = 'name';
@orlyapps I am facing the same exact issue even though my options are formatted the same way you have it.. is there any other reason to that? Also the values are correct and are being added to the database. I just can't view them
If you update resource title to 'name' you can solve the problem. It should be public static $title = 'name';
Thank you very much this works now. do you have an idea on how to set a default selected value?
Either : this
or
Give me :
it is the correct amount of values all the time , but there does not seem to be a title whereas when I use the normal 'BelongsTo' the values are there perfectly fine.
Am I doing something wrong? or is this a bug in the package, please let me know.