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 ); }}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community