Redirect on save

Posted 4 years ago by christopher


If i create or update something i want to give the user the possibility to "save" or "save & back".

In my controller i have currently this:

return Redirect::to('/profile')->withInput()->with('success', 'updated.')

How can i add a secound return IF the user clicks "save & back" ?

return Redirect::back()->withInput()->with('success', 'updated.')

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.