mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 13:14:07 -08:00
Fixed bad groups route on error
This commit is contained in:
parent
d1fe7abb18
commit
b326d8593b
|
@ -66,7 +66,7 @@ class GroupsController extends Controller
|
|||
if ($group->save()) {
|
||||
return redirect()->route("groups.index")->with('success', trans('admin/groups/message.success.create'));
|
||||
}
|
||||
return redirect(route('groups.create'))->withInput()->withErrors($group->getErrors());
|
||||
return redirect()->route('groups.create')->withInput()->withErrors($group->getErrors());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,7 +104,7 @@ class GroupsController extends Controller
|
|||
public function update($id = null)
|
||||
{
|
||||
if (!$group = Group::find($id)) {
|
||||
return redirect()->route('groups')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
|
||||
return redirect()->route('groups.index')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
|
||||
}
|
||||
$group->name = e(Input::get('name'));
|
||||
$group->permissions = json_encode(Input::get('permission'));
|
||||
|
@ -132,7 +132,7 @@ class GroupsController extends Controller
|
|||
{
|
||||
if (!config('app.lock_passwords')) {
|
||||
if (!$group = Group::find($id)) {
|
||||
return redirect()->route('groups')->with('error', trans('admin/groups/message.group_not_found', compact('id')));
|
||||
return redirect()->c->with('error', trans('admin/groups/message.group_not_found', compact('id')));
|
||||
}
|
||||
$group->delete();
|
||||
// Redirect to the group management page
|
||||
|
|
Loading…
Reference in a new issue