pasamsin
3 months ago
225
1
Laravel

how to with array send?

Posted 3 months ago by pasamsin

How do I send the Arra with with and how is it printed on the screen?

Controller.php $msg_array = ['message' => 'any message','message_type'=>'danger'];

return redirect()->route('frontend.activation') ->with('msg', compact('msg_array'));

template.blade.php

{{session('msg')}

Facade\Ignition\Exceptions\ViewException htmlspecialchars() expects parameter 1 to be string, array given (View:

Please sign in or create an account to participate in this conversation.