Laravel Version: Irrelevant
Voyager Version: 0.11
Docs claim that dropdowns are setup like:
{
"default": "",
"options": {
"m": "Male",
"f": "Female"
}
}
Notice the word options [sic].
It should be option - notice the _missing letter s_:
{
"default": "",
"option": {
"m": "Male",
"f": "Female"
}
}
Why should it be option? Looking at the code (both the tagged v0.11.14 and master branch.. see links below), it's looking for options with the 's'.
v0.11.14: https://github.com/the-control-group/voyager/blob/v0.11.14/resources/views/formfields/select_dropdown.blade.php#L18
master: https://github.com/the-control-group/voyager/blob/master/resources/views/formfields/select_dropdown.blade.php#L18
(2/2) ErrorException
Undefined property: stdClass::$ (View: C:\laragon\webroots\playhq\attendence-laravel\vendor\tcg\voyager\resources\views\bread\browse.blade.php)

I agree - options should work but it's not (at least for me).
@fletch3555 - all I know is that changing it from options to just option fixes it all.
This might be an issue but I don't see how this would affect it.
More information - on the edit view, no dropdown is created when the word option (no s) is used, so @fletch3555:
option option in the edit view and renders it as an empty relationYeah, seems options is perfectly correct, but is manifesting as the problem, hiding the real problem. This is going to take a bit more digging to figure out. I haven't had much time lately, and haven't been able to reproduce it locally, so if someone else can, please feel free to take lead on troubleshooting
Just wanted to comment that I have the same issue. Using options:
Undefined property: stdClass::$Lobby (View: /var/www/zoomrec/vendor/tcg/voyager/resources/views/bread/browse.blade.php)
Changing to option results in the same bug as described by @lloy0076 above with no dropdown generated when editing.
Is this still a problem?
Looking at the code options is the correct key.
Why should it be
option? Looking at the code (both the taggedv0.11.14andmasterbranch.. see links below), it's looking foroptionswith the 's'.v0.11.14: https://github.com/the-control-group/voyager/blob/v0.11.14/resources/views/formfields/select_dropdown.blade.php#L18
master: https://github.com/the-control-group/voyager/blob/master/resources/views/formfields/select_dropdown.blade.php#L18
link broken
Likely because 0.11.14 was released like 2+ years ago and we pruned away most of the pre-1.0 tags. You're quoting a comment from 2.5+ years ago, and related to a MUCH older version, so it's not likely to be relevant anyway
Most helpful comment
More information - on the
editview, no dropdown is created when the wordoption(nos) is used, so @fletch3555:optionoption in theeditview and renders it as an empty relation