Skip to content

Relation with multiple select - how show pre-selected values #2753

Answered by macit-emre
info170 asked this question in Q&A
Discussion options

You must be logged in to vote

i think you should use plural form of project_id as 'news.project_ids.' then you should load your model with that project_ids using 'with' in your model public function project_ids(){ return $this->belongsToManyBlaBla() } then this will probably show up.

A little workaround is, load your ids and their labels by hand, then give Relation::make(blabla)...->value($idsFetchedByHand)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@info170
Comment options

Answer selected by info170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants