From 5688bca5b4f9c276fd526cbfa13fdb9a3ed998ce Mon Sep 17 00:00:00 2001 From: JediKnight Date: Fri, 19 Jun 2020 15:44:13 +0300 Subject: [PATCH] fix: redirects after updating entities --- src/Http/Screens/EntityEditScreen.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Http/Screens/EntityEditScreen.php b/src/Http/Screens/EntityEditScreen.php index ff2c652..ceb54e5 100644 --- a/src/Http/Screens/EntityEditScreen.php +++ b/src/Http/Screens/EntityEditScreen.php @@ -132,13 +132,10 @@ public function save(EntityContract $type, Post $post, Request $request): Redire Alert::success(__('Operation completed successfully.')); $route = is_a($type, Many::class) - ? 'platform.entities.type' + ? 'platform.entities.type.edit' : 'platform.entities.type.page'; - return redirect()->route($route, [ - 'type' => $post->type, - 'slug' => $post->slug, - ]); + return redirect()->route($route, [$post->type, $post->slug]); } /**