In Laravel 8, if I want to redirect to named route I can use:
return redirect()->route( 'success' )->with('status', 'Profile updated!');
It will always redirect "status" with the value of "Profile updated!" which I can then display in my view with:
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
But how can I pass an array using redirect()->route() instead of just a single value?
->with('status', [1, 2, 3]);or something like->with('status', 'Profile updated!')->with('array', [1, 2, 3]);?