How do I eager load this?

Select::make('roles') ->required() ->multiple() ->relationship('roles', 'name') I want the role names to be populated without having to start typing to find them.. I know this seems obvious and I recall reading it in the documentation previously, but I can't seem to find it now.
3 Replies
Dennis Koch
Dennis Koch2y ago
->preload()?
benshawuk
benshawukOP2y ago
Ah, that's it! Thanks. Sorry for the easy question! I think I need to read the docs from cover to cover.
cheesegrits
cheesegrits2y ago
Several times. 🙂 I've probably read them 5 or 6 times, I still find new stuff, or things I now more fully understand, every time.

Did you find this page helpful?