Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

madsynn's avatar

Request Help Please

Ok i have a problem connecting my select fields on my create.blade.php

$channel_sources = \App\Csi::get()->pluck('move_path', 'id')->prepend(trans('global.app_please_select'), '');

I have 4 Models.

channel.php

cs.php

csi.php

cso.php

My problem is im trying to get my cso.php to select channel from csi but only channels from channel.php that are assinged to cs.php and configured in csi.php

I need the select field to show the channel->source_name from channel.php but only show ones that have been configured in the csi.php

Maybe something like this?

 \App\Csi::get()->pluck($channel->source_name, 'channel_id', id)

any help would be great.

0 likes
1 reply
Snapey's avatar
Snapey
Best Answer
Level 122

Sorry but its impossible to know how those models are related, or really, what you are asking for.

Please note, you don't need to use get() before pluck()

In your example, what is $channel ? don't you need a where() condition on Csi?

Please or to participate in this conversation.