我想只提取数组的值并打印到刀片.我怎样才能实现它?下图是阵列.
public function view_send_email()
{
$data["_email_list"]=Tbl_press_release_email::get();
$data["sent_email"] = Request::input('sent_email');
$mail = Session::get('email'); <--- array i want to get the value of it.
dd($mail);
return view("member.email_system.send_email_press_release",compact('data', 'mail'));
}
最佳答案 在视图中,您可以像这样遍历数组:
@foreach($mail as $email)
{{$email}}
@endforeach
要将它们存储在输入中,您可以这样做:
{{ Form::text('emalis', implode(" ", $mail)) }}
要么
<input name="first_name" type="text" value={{implode(" ", $mail)}}>