return view('msg.simple', [
'message' => 'here is my message',
'links' => [
[
'title' => 'link title 1',
'url' => 'www.example.com'
],
[
'title' => 'link title 2',
'url' => '#2'
]
]
]);
view file (blade):@foreach($links as $link)
<a href=""></a>
@endforeach
but it shows the following error:htmlspecialchars() expects parameter 1 to be string, array given
from Latest question asked on Laravel tag.
via Ali Sherafat