Extract only the array values ​​and print the LARAVEL blade

I want to extract only the value of this array and print it. How can i achieve this? below is an array.

enter image description here

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'));

}
+4
source share
1 answer

In a view, you can iterate over an array this way:

@foreach($mail as $email)
    {{$email}}
@endforeach

To save them in the input, you can do it like this:

{{ Form::text('emalis', implode(" ", $mail)) }}

Or

<input name="first_name" type="text" value={{implode(" ", $mail)}}>
+1
source

Source: https://habr.com/ru/post/1688069/


All Articles