/** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { $data['group'] = $group = Group::find($id); if ($group) { $data['permissions'] = Permission::all(); $data['userPermissions'] = Permission::formatpermission($group->permissions); $data['cancelbtn'] = Permission::hasPermission('groups.index'); return view('groups.edit', $data); } else { Session::flash('danger', Lang::get('ruban.group.notfound')); return Redirect::route('ruban.groups.index'); } }