Skip to content

Commit

Permalink
Merge pull request #36 from CodingJediKnight/master
Browse files Browse the repository at this point in the history
fix: redirects after updating entities
  • Loading branch information
CodingJediKnight authored Jun 19, 2020
2 parents 6e1299d + 5688bca commit ffd3d0f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Http/Screens/EntityEditScreen.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

/**
Expand Down

0 comments on commit ffd3d0f

Please sign in to comment.