fogley
112
5
General

Redirect with data

Posted 6 months ago by fogley

Is there a way to pass data to a redirection in the same vein as when returning views?

Like this

return redirect->('/home')->with('variable', 'variable data')

I'm aware that I can do the following, but that transfers the data via GET which I'm not interested in:

return redirect()->route('home', ['variable' => 'variabledata']);

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

Reply to

Use Markdown with GitHub-flavored code blocks.