Skip to content

Visit promises deprecated #842

Answered by liam-ot
liam-ot asked this question in Help
Aug 2, 2021 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

the issue as mentioned by @xavi7th is due to the return type being turned into a promise

if you are routing like this

Redirect::route('someRoute')->with('success', $success_message);

or

Redirect::back()->with('success', $success_message);

change it instead to

return redirect()->back()->with('success', $success_message);

unfortunately this still causes a promise warning

return redirect()->route('someRoute')->with('success', $success_message);

but i will update once i find a workaround

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@liam-ot
Comment options

@xavi7th
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by liam-ot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants