refactor: harmonize redirects after submitting forms

go back to form after submitting an edit form
This commit is contained in:
Yassine Doghri 2022-01-05 14:58:53 +00:00
commit d0cb964b0f
36 changed files with 179 additions and 57 deletions

View file

@ -255,7 +255,10 @@ class PodcastController extends BaseController
$db->transComplete();
return redirect()->route('podcast-view', [$newPodcastId]);
return redirect()->route('podcast-view', [$newPodcastId])->with(
'message',
lang('Podcast.messages.createSuccess')
);
}
public function edit(): string
@ -354,7 +357,10 @@ class PodcastController extends BaseController
$db->transComplete();
return redirect()->back();
return redirect()->route('podcast-edit', [$this->podcast->id])->with(
'message',
lang('Podcast.messages.editSuccess')
);
}
public function deleteBanner(): RedirectResponse