$users=a:3:{i:0;s:14:"[email protected]";i:1;s:14:"[email protected]";i:2;N;}
$usermail=unserialize($users);
$usermail=json_encode($usermail);
Mail::to($usermail)
->send(new MeetingInvite($meeting,$usermail));
Problem is in
to()
method when I pass static valueto(['[email protected]','[email protected]'])
it worked.
unserialized
format. How to use this.I found an error in the array. Last value of the array is Null.
And Removing whitespace solved the problem by using
str_replace()
.