TestController.php
$data = array(
'name'=>"Micko Dela Sample",
'm1' => "Email Subject",
'm2' => $request->message //this is the checkbox and has a value of "one two three" and "four five six" take note this is an array
);
Mail::send('emails.mail', $data, function($message) use ($data) {
$message->to('mickojel.delarosa@gmail.com', 'Micko Dela Rosa')->subject
($data['m1']);
$message->from('xyz@gmail.com','Micko Main Machine');
});
echo "HTML Email Sent. Check your inbox.";
email.php
@foreach($m2 as $m)
<p>
{
<br>
"Value": "$m",
<br>
}
</p>
<br>
@endforeach
输出为: 1 2 3 4 5 6
但是有一种方法可以显示输出,如... 第一个数字是:$ m-> 1 第二个数字是:$ m-> 2 …。等等
我尝试使用爆炸和内爆,但还是没有运气。