Skip to content

Commit

Permalink
redirect back to index when resource deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard authored Jun 17, 2019
1 parent 9a901ee commit 6952359
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Controllers/ScaffoldController.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ public function delete(Module $module)

$message = trans('administrator::messages.remove_success', ['item' => app('scaffold.module')->singular()]);

if (URL::previous() === route('scaffold.view', ['module' => $module, 'id' => $id])) {
return back()->with('messages', [$message]);
}

return redirect()->to(route('scaffold.index', ['module' => $module]))->with('messages', [$message]);
}

Expand Down

0 comments on commit 6952359

Please sign in to comment.