Support the ongoing development of Laravel.io →
Views Blade
Last updated 2 years ago.
0

Hi,

you can write it by following way.

=> first write this code in your controller.

$agentArr = [];

foreach($agents as $agent ){ $agentArr[" $agent->id"] = "$agent->first_name $agent->first_name"; }

pass $agentArr to your view file.

=> In your view.blade.php file:-

{{ Form::select('AgentName', $agentArr ); }}

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.